Tanveer’s Weblog

Entries categorized as ‘Apache’

[Apache] Loopback Interface Testing

July 15, 2008 · 2 Comments

Sometimes it’s really important to test multiple websites on localhost. How we can do that? Very easy! ;) .. Yes we can use different port for each site. Some days ago i found one of the windows hosting server did this for their different users. So we can also be able to to it in apache..

What we need is to initialize the port for each site.. here is an example

We need to edit our httpd.conf file and paste these code in the suitable place

Listen 127.0.0.1:8000
Listen 127.0.0.1:1111
BindAddress 127.0.0.1

Port 1111
Port 8000

ServerName 127.0.0.1

NameVirtualHost *

<VirtualHost *:8000>
DocumentRoot “/home/username/test/example.org/htdocs”
<Directory “/home/username/test/example.org/htdocs”>
Options Indexes FollowSymLinks MultiViews
AllowOverride None

Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost *:1111>
DocumentRoot “/home/username/test/example.com/htdocs/”
<Directory “/home/username/test/example.com/htdocs/”>
Options Indexes FollowSymLinks MultiViews
AllowOverride None

Order allow,deny
Allow from all
</Directory>
</VirtualHost>

done, now port 8000 is for our development and 1111 is for testing purpose

enjoy ;)

Ref: Security Tips for Server Configuration

Categories: Apache · Linux · Tips' n Tricks'
Tagged: ,

501 Method Not Implemented

May 8, 2008 · 2 Comments

Well, i solved this error in my style. What i did just append these following lines at the end of my apache web server config file (httpd.conf) and restart apache server.

Waoow!!! It solves the problem.

<VirtualHost *:80>
SecRuleInheritance Off
</VirtualHost>

Hope it will save lots of time to others ;)

Categories: Apache · Linux · Tips' n Tricks'