Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
My websites stoped workign and now displays 403 forbidden. I can assure you the user is azevedo (me) and it's chmoded 755 recursively. It worked like a week ago and stoped. So far none of the threads here have fixed it. I'm about to completely remove apachy and try again.
The roughter is the way it should be.
Here are the configs.
Code:
apache2
...
# Include the virtual host configurations:
#Include /etc/apache2/sites-enabled/[^.#]* (original setting)
Include /etc/apache2/sites-enabled/000-default (tried this but doesn't work)
Code:
sitesenabled/000-default
NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost
DocumentRoot /files/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /files/www/>
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
# Commented out for Ubuntu
#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>
<Directory "/files/www/backup">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0
</Directory>
</VirtualHost>
Btw I have no idea what /files/www/backup is. It just kindof appeared one day.
# Include the virtual host configurations:
#Include /etc/apache2/sites-enabled/[^.#]* (original setting)
Include /etc/apache2/sites-enabled/000-default (tried this but doesn't work)
DocumentRoot /files/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /files/www/>
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
# Commented out for Ubuntu
#RedirectMatch ^/$ /apache2-default/
</Directory>
ehm.. why are you using 2 directory blocks for the same directory?
better to combine it to something like:
<VirtualHost *>
ServerAdmin webmaster@localhost
DocumentRoot /files/www/
<Directory /files/www>
AllowOverride None
Options Indexes FollowSymLinks MultiViews
Order allow,deny
allow from all
</Directory>
let's continue:
Quote:
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>
thus all PERL/CGI scripts reside in /usr/lib/cgi-bin (this should have the right permissions to work! did you check this?
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Quote:
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>
remove things you don't use!
Quote:
<Directory "/files/www/backup">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0
</Directory>
</VirtualHost>
Btw I have no idea what /files/www/backup is. It just kindof appeared one day.
Things cannot just appear out of the blue in a config file. (this must be done by hand, or by tool you triggered yourself (or via cron))
But then again.. remove what you don't need!
No joke it did appear out of noware. One day the entire folder just appeared! I just left it alone and didn't think much about it. It is kind of wierd though. I never added /files/www/backup.
edit...
I completely reinstalled apache and this is the file. The only thing I've done is change /var/www to /files/www and the email. This means it has nothing to do with the file but with something else. The file I posted above is just like the original so it actually never did have anything to do with file.
Code:
NameVirtualHost *
<VirtualHost *>
ServerAdmin 1veedo@yahoo.com
DocumentRoot /files/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /files/www/>
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
# Commented out for Ubuntu
#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>
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.