Setup Minimalis Unmanaged Server Configuration for Web Proxy Server

Setup Minimalis Unmanaged Server Configuration for Web Proxy Server

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

<VirtualHost *>
ServerName example.com
ServerAlias *.example.com
DocumentRoot /home/example/public_html
</VirtualHost>

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 :)

5 Comments »

  1. avatar comment-top

    Thanx for the valuable information. How to use a proxy server? Please provide information over it. Provide links to related topics if possible.  

    comment-bottom
  2. avatar comment-top

    Great tutorial. I would also like to know about how to use proxies. Thanks  

    comment-bottom
  3. avatar comment-top

    Thanks for the great tutorial !

    You saved me from lots of hours of stress.  

    comment-bottom
  4. avatar comment-top

    This is very useful but easy to follow tutorial. Thanks for sharing this codes. It can really help a lot to me.  

    comment-bottom
  5. avatar comment-top

    WOw.. Your codes are really great. I can see that you really know your stuff. Thanks for sharing this.  

    comment-bottom

RSS feed for comments on this post. TrackBack URL

Leave a comment