Forum Moderators: phranque

Message Too Old, No Replies

Problems understanding name based on 2.2

         

flycast

1:34 am on Nov 14, 2006 (gmt 0)

10+ Year Member



I have a brand spanking new linux installation of Apache 2.2. My last brush with Apache was on a XP box and version 1.3.

I have read the help file and see the way that the sites-enabled and sites-available work. In my sites-available I have the following config file called "backuppc"

NameVirtualHost backuppc
<VirtualHost backuppc>
ServerAdmin webmaster@localhost

DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
</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.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>

In my sites-enabled I have link that points to this file. The problem is it seems that no matter what I try I can't get anything to work in my browser. How would I configure this file to have [backuppc...] point to my local drive?

encyclo

2:18 am on Nov 14, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If I understand it correctly, if you're not depending on DNS to resolve the host name, you will have to add an entry to your client machine's hosts file which points to your server. eg.

backuppc 192.168.0.2

(replace 192.168.0.2 with the network IP address for your Linux server).

flycast

4:12 am on Nov 14, 2006 (gmt 0)

10+ Year Member



Yes. I added an appropriate entry to my hosts file:
127.0.0.1 backuppc

My backuppc virtual host file looks like this but it still is serving the page out of /var/www rather than /etc/BackupPC

I do have an index.html file in the /etc/BackupPC folder. I guess I am expecting the index.html file in /etc/BackupPC to be served.

NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost

DocumentRoot /etc/BackupPC
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /etc/BackupPC/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
RedirectMatch ^/$ /apache2-default/
</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.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>