On the last post i talk about Setup unmanaged VPS with Litespeed Php and mySQL.
This time we will setup an unmanaged VPS (with OS centOS) to host multiple web proxy domain.
WebProxy consume a huge amount of server’s resources, so it would be kind if you configure your server to minimalis configuration, leave everything that not used for web proxy server, like mySQL, postfix and etc. What we need in web proxy server is httpd service (like apache), PHP, perl, python and curl. FTP server is required too in order to upload and edit web proxy script.
Login to your server, i recomend you use bitvise tunellier, and after login go to xterm terminal.
1. Install apache PHP perl python and curl
# yum -y install perl perl* python python* httpd php php*
Curl that important for web proxy to work properly will be installed too. Start httpd service :
# service httpd start
Test your webserver by enter your server’s IP in a browser’s address bar
2. Create virtual host in apache to host your domain
For example, we will host example.com with username example and password foo1234 on document root directory at /home/example/public_html
First, create user example
# groupadd example
# useradd example -g example
# passwd example
Enter foo1234 when prompted, don’t be confused when you type it but nothing appear on screen, it use keyboard stroke. Enter foo1234 once again to confirm the pasword. Now user example is created, and it’s home directory on /home/example is automatically created too.
Create /home/example/public_html directory as document root directory
# mkdir /home/example/public_html
# chown example:example /home/example/public_html
Open new sFTP Window on tunellier, go to /etc/httpd/conf and download httpd.conf
Open it with text editor like notepad (do not use wordpad or microsoft word), enter these line in the end of httpd.conf
NOTE : use * only if your server have 1 ip address, if more than one, change * with the IP address.
Upload it again to replace old file on server
Now restart apache
# service httpd restart
Setting your domain, on your domain registrar control panel point the A record to your server IP address. Your domain is now hosted in your server.
3. Install FTP server (proFTPd)
on Xterm terminal, enter this command :
# yum -y install proftpd
# service proftpd start
Finished, you can login to your server via FTP with FTP client program like Filezilla in your PC to upload proxy script with login details like this:
FTP server : yourserverIP
username : example
password : foo1234
You will automatically redirected to /home/example directory. Upload your script to /home/example/public_html
Enjoy your Web Proxy