TurnKey Linux Virtual Appliance Library

LAMP Stack - Change Management Ports

Fairly new to Turnkey and pretty new to Linux. I'm looking after a Turnkey LAMP server that is soon to be going live with it's first site. Being on the security side of the industry I'd like to secure the access to the Server admin a little more. Currently you can get to the initial control panel on tcp port 80 (http) and 443 (https with self sign cert). I'd like to change that to the control panel works on port 8000 and the secure access is on 4443.

What I've tried: -

I edited ports.conf and added listen 8000 and Listen 4443.

I copied all files and directories from /var/www/* to /var/www/siteadmin/

I edited /sites-available/default and change it to the following: -

NameVirtualHost *:8000
NameVirtualHost *:4443

<VirtualHost *:8000>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/serveradmin
</VirtualHost>
<VirtualHost *:4443>
        SSLEngine on
        SSLCertificateFile /etc/ssl/certs/cert.pem
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/serveradmin
</VirtualHost>
ScriptAlias /cgi-bin/ /var/www/serveradmin/cgi-bin/
<Directory /var/www/serveradmin>
        Options Indexes FollowSymLinks MultiViews
        Order allow,deny
        allow from all
</Directory>
 
My plan was to then add an apache virtual server *:80 and *:443 and then add server name virtual servers.
 
My problem is that when I change the default values of the admin control panel the webmin link is then seen as http://x.x.x.x:8000:12321 which fails.
 
Any ideas welcome

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)