PDA

View Full Version : [ubuntu] Virtual Host Problem in Hardy



madhusudancs
May 20th, 2008, 04:02 AM
I am trying to run multiple websites from different locations on my Hardy machine. I did the same procedure I used to use on Feisty and Gutsy. I have even logged this procedure in my blog http://madhusudancs.info/virtualserver-setup. But it doesnot work.

When I give the address in the browser it says


Forbidden

You don't have permission to access / on this server.
Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5 with Suhosin-Patch mod_vhost_hash_alias/1.0 Server at mywiki Port 80

This is the procedure I followed, I copied two files from default and named them drupal6 and mediawiki

one of these files looked like this


<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName drupal6

DocumentRoot /home/madhu/mywebdevelopment/drupal6.0/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/madhu/mywebdevelopment/drupal6.0/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined
ServerSignature On

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>

and I do this in the terminal


sudo a2ensite drupal6
sudo a2ensite mediawiki
sudo /etc/init.d/apache2 restart

to the Hosts list I add these details

IP address: 127.0.0.2 Alias: drupal6
IP address: 127.0.0.3 Alias: mywiki

and when I type http://drupal6 or http://mywiki in the browser I get the above mentioned error. Please help me

Thanks in advance

windependence
May 20th, 2008, 07:48 AM
Didn't you have another thread on this?

-Tim

madhusudancs
May 20th, 2008, 08:06 AM
Hey thanks for the reply. I dont think I personally have posted a thread on this. If so please link me to that. I still say no to it. The previous post I did was on Bridge Mode settings and I am sad that I haven't got any help on that. If there is a thread on the same issue posted by somebody else please link me.

windependence
May 20th, 2008, 08:35 AM
Let me see if I can find it for you.

-Tim

bennybobw
May 21st, 2008, 09:39 PM
That was my thread, and I still haven't resolved it.
It's here:
http://ubuntuforums.org/showthread.php?t=797903

Can you check your error log and post the results over there?

spiderbatdad
May 22nd, 2008, 02:29 AM
the above error looks like the result of an .htaccess file with no corresponding .htpasswd file.
Also, possibly edit /etc/hosts to point to your local ip:
<ip> domain.com

bennybobw
May 22nd, 2008, 06:28 AM
Check your permissions on mywebdevelopment too... that's what screwed me up (http://ubuntuforums.org/showthread.php?t=797903&page=2).

madhusudancs
May 25th, 2008, 07:59 PM
the above error looks like the result of an .htaccess file with no corresponding .htpasswd file.
Also, I have never needed to edit the hosts file for apache use. Instead I specify ServerName localhost in httpd.conf

/etc/hosts contains 127.0.0.1 localhost

Is this what you are try to accomplish?
http://spiderbatdad.podzone.org

I can also make it so the host html page wont display without authorization.

I dont think this is the problem. I never used .htaccess files either in feisty or in gutsy. How this problem arises only in hardy? There is something wrong somewhere else.

madhusudancs
May 25th, 2008, 08:00 PM
Check your permissions on mywebdevelopment too... that's what screwed me up (http://ubuntuforums.org/showthread.php?t=797903&page=2).

Permission is 777 recursively on that direcroty. I had seen your post before posting this.