Posts Tagged 'Plesk'

Howto: AJAX-based SSH client for your Debian+Plesk Setup (AjaxTerm)

I recently read an article about AjaxTerm in the German Linux Magazin. It is a AJAX-based SSH client which runs in your browser. So with the respective setup you are able to access your box’ shell from anywhere just with a browser. You do not even have any problems with firewalls and proxies anymore!

This is a small guide which explains how to setup AjaxTerm on a Debian System with Plesk:

1. Go to the AjaxTerm Website and download the latest release (currently 0.10).
# wget http://antony.lesuisse.org/qweb/files/Ajaxterm-0.10.tar.gz

2. Extract the archive, become root, move the folder to /usr/local/ and create a symlink for easier access.

# tar xvzf Ajaxterm-0.10.tar.gz
# su
# mv Ajaxterm/ /usr/local
# ln -s /usr/local/Ajaxterm-0.10 /usr/local/ajaxterm
# cd /usr/local/ajaxterm

3. Copy the Debian init script for AjaxTerm to /etc/init.d/ and add it to all default run levels

# cp configure.initd.debian /etc/init.d/ajaxterm
# update-rc.d ajaxterm defaults

4. Edit the init script and change the variable DAEMON to /usr/local/ajaxterm/ajaxterm.py and PORT to 8022. Check that the executable name is ajaxterm.py (with the file extension!).

5. Make the init script executable and start AjaxTerm

# chmod a+x /etc/init.d/ajaxterm
# /etc/init.d/ajaxterm start
Starting ajaxterm on port 8022
AjaxTerm at http://localhost:8022/ pid: 7580

AjaxTerm is now successfully running (it started ssh session on localhost with user nobody) but is only listening on localhost:8022. Therefore we will use the Apache proxy module to access AjaxTerm using a subdomain. (As we did in the Plesk on Port 443 Howto)

6. Create a new subdomain with PHP support in Plesk, e.g. ajaxterm.example.com.

7. Go to the conf directory of the new domain.
# cd /var/www/vhosts/example.com/subdomains/ajaxterm/conf

8. Create a new vhost.conf with the following lines.

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

ProxyPass /ajaxterm/ http://localhost:8022/
ProxyPassReverse /ajaxterm/ http://localhost:8022/

9. Activate the proxy Apache module, reconfigure Plesk so that it finds the new vhost.conf and reload the apache configuration.

# a2enmod proxy
# /usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=example.com
# /etc/init.d/apache reload

You should not get any errors!

10. Access AjaxTerm: https://ajaxterm.example.com/ajaxterm/ (Don’t forget the trailing slash!)

11. Because we do not want to be able to use AjaxTerm over unsecured HTTP, we create a simple index.php in httpdoc/ and httpsdoc/ of the subdomain folder, which will redirect to the above link. Furthermore you should delete the index.html file in httpdocs/ and httpsdocs/.

< ? header("Location: https://" . $_SERVER['SERVER_NAME'] . "/ajaxterm/"); ?>

Now you should be able to access AjaxTerm by visiting https://ajaxterm.example.com with your browser.

If you are really paranoid you should secure the access furthermore by setting up an authentication, e.g. basic http authentication.

Who wants a virtual server for free? ;-)

Unbelievable…my “old” vserver at 1blu is still running although the contract ended on 2006/05/25. Well…1blu needs two weeks to setup a vserver, at least 2 weeks to help with problems, 2 weeks for transferring domains and 2 weeks to process the cancellation of contracts. So I think it is just fair, that they need 2 weeks to shutdown the vserver as well. ;-)

Howto: Installing PHP5 on Debian 3.1 with Plesk 8

This is a small Tutorial how to install PHP5 on Debian 3.1 with Plesk 8.0.0.

(1) Add new source to /etc/apt/sources.list
deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all
(2) Install PHP 5 – WARNING: Plesk is currently not compatible to MySQL5! So make sure, that you do not upgrade your MySQL Installation.
apt-get install psa-php5-configurator
apt-cache search php5
…and install any of the php modules you want.
(3) THIS STEP IS PROBABLY NOT NEEDED ANYMORE WITH PLESK 8 AND ABOVE! So try out https://webmail.example.com first!
Fix Horde Webmailer:
apt-get install php5-pear
pear upgrade DB
cd /usr/share/psa-horde/pear
tar cvzf DB.backup.tar.gz DB.php DB/
rm DB.php
rm -R DB/
cp -R /usr/share/php/DB* .

(4) That’s it!

Running Plesk on port 443

Today, I wrote a small tutorial about how to run Plesk on port 443 using mod_proxy.
—————————————————

This howto describes the configuration of your server to let your users login to plesk using standard ports 80 (http) and 443 (https). This is especially helpful, if you are behind any kind of firewall or proxy, which prohibits access to plesk’s standard port 8443. This solution uses mod_proxy to create an internal forward from ports 80/443 to port 8443.

Please notice, that you will not have access to the Virtuozzo Panel in Plesk when using this solution. But as access to Plesk and(!) Virtuozzo Panel is still available on Port 8443, this should not be problem for your clients.

I created this howto on a Debian Linux system. Therefore you will have to replace some of the commands with commands of the Linux distribution, which you are using. Basically, the configuration should work on any Linux system.

My test system: VPS, Debian 3.1, Plesk 8

(1) install mod_proxy_html
apt-get install libapache2-mod-proxy-html

(2) activate mod_proxy_html in apache configuration
a2enmod proxy_html

(3) create subdomain with ssl support through Plesk (example: plesk.example.com)

(4) create a file called vhost.conf in /var/www/vhosts//subdomains/plesk/conf/ and insert the following options:

ProxyPass / https://localhost:8443/
<Location />
ProxyPassReverse /
</Location>
SSLProxyEngine On

<Proxy *>
Order deny,allow
Deny from all
Allow from all
</Proxy>
(5) let Plesk reconfigure your domain (replace example.com with your domain)
/usr/local/psa/admin/sbin/websrvmng –reconfigure-vhost –vhost-name=example.com

(6) restart Apache
/etc/init.d/apache2 restart

(7) access Plesk using https://plesk.example.com or http://plesk.example.com

(8) Send me an eCard, email or comment this blog entry directly to give feedback on this tutorial. :-)
—————————————————



Archives

del.icio.us links