Archives for: January 2010

01/27/10

Permalink 08:14:15 am, by admin Email , 372 words   English (US)
Categories: Plesk

Easy Plesk Access Tricks

Plesk is a popular web hosting control panel used by many of our clients. On servers with Plesk, the control panel is located at:

https://yourdomain.com:8443

There are several problems with this URL:

1. It's hard for users to remember the 8443 on the end and the https on the beginning of the URL.

2. Plesk by default uses a self signed SSL certificate that causes warning to be displayed in the user's web browser.

Wouldn't it be nice if you could put Plesk on a friendly URL like https://plesk.yourdomain.com?

Also lets have:

http://plesk.yourdomain.com

automatically redirect to:

https://plesk.yourdomain.com.

Now the your users don't have to remember the https part either.

Now lets get really fancy. Suppose your customer has a domain named acme.com hosted on your server. It would be nice to have the URL:

http://acme.com/plesk

redirect to:

http://plesk.yourdomain.com.

Guess what - it can all be done! Here's how:

1. Get an SSL certificate for plesk.yourdomain.com. A $29 cert from GoDaddy will work just fine. Place the SSL key in:

/etc/pki/tls/private/plesk.yourdomain.com.key

and the SSL certificate in:

/etc/pki/tls/certs/plesk.yourdomain.com.crt

2. Next, create /etc/httpd/conf.d/plesk_proxy.conf with the following contents:


Redirect permanent /plesk https://plesk.yourdomain.com

<VirtualHost *:80>
   ServerName plesk.yourdomain.com
   Redirect permanent / https://plesk.yourdomain.com
</VirtualHost>

<VirtualHost *:8444>
   ServerName plesk.yourdomain.com
   ErrorLog logs/plesk_proxy.error_log
   CustomLog logs/plesk_proxy.access_log common

   SSLEngine on
   SSLProtocol all -SSLv2
   SSLCipherSuite ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM
   SSLCertificateFile /etc/pki/tls/certs/plesk.yourdomain.com.crt
   SSLCertificateKeyFile /etc/pki/tls/private/plesk.yourdomain.com.key

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

   SSLProxyEngine On
   ProxyPass / https://127.0.0.1:8443/
   ProxyPassReverse / https://127.0.0.1:8443/
</VirtualHost>

Now just restart Apache and you're ready to go.

Couple of issues to note:

  1. You'll need to add the hostname plesk.yourdomain.com to DNS.
  2. Depending on your server config, you may need to place plesk.yourdomain.com on a dedicated IP address since each IP address can host only a single SSL site.

01/22/10

Permalink 04:50:10 am, by admin Email , 59 words   English (US)
Categories: PHP

PHP4 and PHP5 On The Same Server

If you have a server with PHP4 installed but need PHP5 on some websites then:

  1. Install a custom build of PHP5 to /opt/php5.
  2. Add lines like the following to your apache virtual host:

    AddHandler application/x-httpd-php5 .php 
    ScriptAlias /bin /opt/php51/cgi-bin
    Action application/x-httpd-php5 /bin/php5

You might also find the RemoveHandler directive handy to disable PHP4.

Permalink 04:46:53 am, by admin Email , 89 words   English (US)
Categories: PHP

PHP4 on CentOS5/RHEL5

If you need PHP4 on a CentOS5/RHEL5 server then you'll find the RPMs linked below very handy. They install to /opt/php4 and can coexist with a default PHP 5 install.

The included conf.d/php4.conf file includes sample lines to run it as a CGI or as a module.

RPMs are here:
http://repo.conforge.com/conforge/CentOS/5/i386/RPMS/
http://repo.conforge.com/conforge/CentOS/5/x86_64/RPMS/

See this URL for details to add the yum repo:

http://wiki.conforge.com/wiki/Linux-PHP4cgiAndPHP5on+CentOS5

January 2010
Sun Mon Tue Wed Thu Fri Sat
 << < Current> >>
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            

Reliable Penguin offers Linux Server Migrations, Systems Administration & Programming. Visit our main website at:

http://www.reliablepenguin.com

Search

Bookmark and Share

XML Feeds

powered by b2evolution