TurnKey Linux Virtual Appliance Library

Overwrote index.php in /var/www/ -- Any way to get it back?

jellatin's picture

Turnkey 12.0 / Debian 6.0.5

Accidentally overwrote the index.php that Turnkey uses to allow access to the web shell, phpmyadmin, etc.  Is there a place to nab that file and drop it in there?

Jeremy Davis's picture

Not that I'm aware of

But you can access them easily from your browser address bar, you just need to know the port numbers and add them on the end of your appliance IP/FQDN (all are https).

WebShell - port 12320 ie https://<appliance-ip-or-fqdn>:12320
Webmin - port 12321 ie https://<appliance-ip-or-fqdn>:12321
phpMyAdmin - port 12322 ie https://<appliance-ip-or-fqdn>:12322

All this info is available from the TKL ConfConsole screen of your appliance (the screen that shows on the local console of your appliance).

If you really want the TKL landing page back (ie the index.php) let me know and I can upload a copy for you. But let me know what appliance you are using (they are different depending on the appliance).

Nick's picture

A copy would be great.  Even

A copy would be great.  Even the code is fine.  I appreciate the info on accessing them but I don't know if the other people who use this appliance would be appreciative.

Jeremy Davis's picture

Here's the code...

You didn't mention which appliance though, so I've assumed that it is the LAMP appliance. I rename mine tkl.php.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta http-equiv="Content-Style-Type" content="text/css">
        <meta http-equiv="Content-Script-Type" content="text/javascript">

        <title>TurnKey LAMP</title>
        <link rel="stylesheet" href="css/ui.tabs.css" type="text/css" media="print, projection, screen"/>
        <link rel="stylesheet" href="css/base.css" type="text/css"/>

        <script src="js/jquery-1.2.6.js" type="text/javascript"></script>
        <script src="js/ui.core.js" type="text/javascript"></script>
        <script src="js/ui.tabs.js" type="text/javascript"></script>
        <script type="text/javascript">
            $(function() {
                $('#container-1 > ul').tabs({ fx: { opacity: 'toggle'} });

        <h1>TurnKey LAMP</h1>
        <div id="container-1">
                <li><a href="#cp"><span>Control Panel</span></a></li>

            <div id="cp">
                <div class="fragment-content">
                        <a href="https://<?php print
                        $_SERVER{'HTTP_HOST'}; ?>:12320"><img
                        src="images/shell.png"/>Web Shell</a>
                        <a href="https://<?php print
                        $_SERVER{'HTTP_HOST'}; ?>:12321"><img
                        <a href="https://<?php print
                        $_SERVER{'HTTP_HOST'}; ?>:12322"><img

                    <h2>Resources and references</h2>

                          <a href="/phpinfo.php">Apache PHP information</a>
                          (to disable: rm /var/www/phpinfo.php)
                          <a href="/server-status">Apache server status</a>
                          (to disable: a2dismod status)
                        TurnKey LAMP release notes</a></li>


Nick's picture

Thank you!  Much appreciated.

Thank you!  Much appreciated.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)