| joe10001@hotmail.com 2006-08-02, 1:32 pm |
| howdy all,
I'm getting a problem with virtual host ! I create a new file based on
the default that come with apache2
(/etc/apache2/sites-available/default). I enabled it with a2ensite and
it even work when I typed www.mydomainname.com
But the problem come when i'm clicking on any link on the main page.
Instead of seeing www.somesite.com/Page in the address bar, I see
something like this 192.168.0.15/bla/bla/Page (where bla/bla are the
folders from /var/www)
I did some tests with the website from outside and it loaded really
slowly and not as it supposed to be.
And the weirdest is while I was trying my website from the outside, I
noticed at the bottom of the browser that it was trying to reach
192.168.0.15/../../. I don't understand since 192.168.0.15 is a private
address and we should not have seen this ! I don't think it's normal !
I'm runnig on the last stable version of debian, with php4, mysql and
i'm getting a static IP from the DNS of no-ip.com
Any help woulb be greatly appreciated tyvm
Here are the file I created for the virtual host:
-----------------------------------------/etc/apache2/sites-available/blabla-----------------------------------------
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName www.mydomainname.com
DocumentRoot /var/www/blabla/catalog
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/blabla/catalog>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default
start page
# in /apache2-default/, but still have / go to the
right place
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error_blabla.log
# Possible values include: debug, info, notice, warn, error,
crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access_blabla.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>
#admin reached only by private address
<Directory /var/www/blabla/catalog/admin/>
AllowOverride None
Order deny,allow
Deny from all
Allow from 192.168.0.0/24
</Directory>
</VirtualHost>
-----------------------------------------/etc/apache2/sites-available/blabla-----------------------------------------
-----------------------------------------/etc/hosts-----------------------------------------
127.0.0.1 localhost.localdomain localhost webserv
192.168.0.15 www.blabla.com
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
-----------------------------------------/etc/hosts-----------------------------------------
|