Just me and what's going on… Bill

Plesk control panel access as a virtual domain

Posted on 24-Dec-2009, Thursday | in Geek | by

I use a VPS (Virtual Private Server) to provide mail and web services for our companies.  This off-loads the server and internet maintenance for our high speed internet server requirements.  The hosting center provides services we simply could not afford to provide directly and at a much more reasonable cost.  Domain configuration and maintenance is mostly performed from a web “control panel”.  Low level host configuration control can be done from a Linux command line using an SSH connection.

The Plesk control panel is connected to via SSL (https:// URL) on port 8443 by default.  This generally works out very well, except when I am on the road and find myself behind a restrictive firewall that only allows web connections on standard ports – port 80 for http and port 443 for https.  When this occurs, I need a way to access the server administration interface without resorting to using my 3G telephone connection.   This turns out to be a perfect opportunity for working with subdomains and Apache proxy support to transparently forward ports 80 and 443 to port 8443 on the same server.

After several hours searching with Google and reading many various proxy solutions and approaches, I discovered a posting on theBartels.de, Running Plesk on Port 443, that covered my requirements and almost worked for me.  I recommend reading the excellent information provided in the post to better understand what I have done.

Requirements:

  1. Apache web server with mod_proxy support enabled
  2. Virtual hosting system that uses Plesk and allows subdomain creation
  3. Access to the subdomain configuration files
  4. Command line access for Plesk and Apache configuration update

Note: In the configuration description, I use example.net to represent the domain to have control panel access configured and plesk.example.net to represent the new subdomain for accessing the control panel.  Use your own domain naming as appropriate and desired.

Configuration steps:

  1. Create a subdomain (plesk.example.net) with SSL support using the Plesk control panel
  2. Create a file called in/var/www/vhosts/example.net/subdomains/plesk/conf/ called vhost.conf with the following content
  3. ProxyPass / https://localhost:8443/

    <Location />
    ProxyPassReverse /
    </Location>

    SSLProxyEngine On

    <Proxy *>
    Order deny,allow
    Deny from all
    Allow from all
    </Proxy>

  4. Login via SSH as an administrative user and reconfigure the domain from the command line using:
      /usr/local/psa/admin/sbin/websrvmng –reconfigure-vhost –vhost-name=example.net

  5. From the command line, reload Apache configuration using the appropriate command depending on your Apache installation:
  6. /etc/init.d/apache2 reload
    or
    /etc/init.d/httpd reload

  7. Test your Plesk control panel access using the new subdomain you configured by opening your browser and connection to https://plesk.example.net/

TAGS: , , , , , , ,

5 Responses to “Plesk control panel access as a virtual domain”

Leave a Reply

Your email address will not be published. Required fields are marked *