Home » Geek » Plesk control panel access as a virtual domain
Dec
24

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/

, , , , , , ,

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

  1. February 5th, 2010 at 16:28 | #1

    Thanks for documenting this process. I am happy to be finally be able to acess Plesk from behind a firewall now.

    I did run into a couple of issues that I think are just typos:

    1. In Step 2, there is an extra close bracket at the end of which causes a syntax error. I just removed it and it worked great.

    2. In Step 3, I had to modify the command to:

    /usr/local/psa/admin/sbin/websrvmng –reconfigure-vhost –vhost-name=example.net

    I just changed “pas” to “psa” and then the single dashes to double ones.

    Thanks again!

  2. February 5th, 2010 at 16:38 | #2

    @Bill Dailey
    Glad it was of some help.

    Thank you for pointing out the typo’s… they are now corrected.

  3. July 11th, 2012 at 19:15 | #3

    Awesome post! I would like to contribute an update (fully tested) for all the Plesk 11 administrators out there. It is quite different.

    ———————-

    1) Execute the below command via SSH:

    /usr/local/psa/bin/subdomain –create SUBDOMAIN_PREFIX_HERE -domain DOMAIN_NAME_HERE -php true -fastcgi true -ssl true -same_ssl true

    ———————-

    2) Create a file at /var/www/vhosts/SUBDOMAIN_PREFIX_HERE.DOMAIN_NAME_HERE/conf/vhost.conf containing the text below, but be 100% sure to replace the {curly brackets} with ‘lesser than’ and ‘greater than’ characters! I had to put curlies so the LocationMatch tags would be visible in this comment area:

    SSLProxyEngine on
    SecRuleEngine Off
    ProxyRequests off
    ProxyPass / https://SERVER_IP_HERE:8443/
    ProxyPassReverse / https://SERVER_IP_HERE:8443/
    {LocationMatch “^[^/]”}
    Deny from all
    {/LocationMatch}

    ———————-

    3) Execute the below command via SSH:

    /usr/local/psa/admin/sbin/httpdmng –reconfigure-domain SUBDOMAIN_PREFIX_HERE.DOMAIN_NAME_HERE

    ———————-

    4) Execute the below commands via SSH:

    service httpd stop
    killall -9 httpd
    service httpd start

  4. May 15th, 2013 at 00:42 | #4

    @Shamus Mac I did your suggestion but I’m having problems logging in to the Plesk Control panel. I have already configured the domain, but when I go to the page and log in, it keeps letting me login. I am stuck at the login page even though my credentials are right. Why am I locked at the login page? Any suggestions?

  5. May 15th, 2013 at 07:42 | #5

    @Bangon Kali
    Wish I could be of some help, but I stopped using Plesk two years ago when I switched to a dedicated server. I have no experience with newer Plesk installs. If you find a solution to your issue, please post it here for the benefit of others.

Add reply