How can I restrict some directories ?
Create your .htpasswd file as follows:
/usr/sbin/htpasswd -c /usr/local/httpd/password.files/.htpasswd ronald
you will be prompted by:
Adding password for ronald.
you type it in and you are finally prompted by:
Re-type new password:
just do it!. Then create the .htaccess file using any plain-text editor in the
directory ro be protected as follows:
<Limit GET POST>
require user ronald
Why does SuSE use -FollowSymlinks as its default?
Is there a good reason why it's not +FollowSymLinks as a default ?
Security. You probably let web
authors create files under your htdocs directory or their public_html
directories. Imagine if one created a symlink to /etc or
Your anonymous FTP server is set up in the same way.
If you don't care about the security issues, you can change it
yourself. It is better that the user knows the issue if they are
How is SuSE setting up Apache to serve public_html files?
This is the way it works:
The apache server will start suexec for the home directories, if it
finds it. It's in /usr/sbin/suexec. Now suexec will let apache run as
testuser:users in testuser's public_html directory. This is different
from the way Apache normally runs as nobody:nogroup. Now suexec
applies alot of restrictions , and it checks all cgi files, and will refuse
to run them if the permissions are off. You need to read the apache docs on
suexec. It allows you to run your public_html as mode 700, but it is more
dangerous, because it lets people come into your public_html as the user,
instead of nobody.
In the main server httdocs and cgi-bin, Apache will run as
SuSE uses a user called wwwrun instead of nobody, but it's about the same.
So you may want to rename suexec to disable it, unless you want to read up on it.
Your testuser should be
in group users. There
is a suexec log in the /var/log/httpd
logs, it will give you some clues.
How does one get rid of unwanted error messages in the Apache logs?
Use Apache itself:
SetEnvIf Request_URI "root.exe|cmd.exe|default.ida" bad-req
CustomLog /var/log/httpd/faq_acces.log combined env=!bad-req
Use it in your server conf and these things will not show in your logs
How do I get SSL working with Apache2 ?
Generate the SSL certificate:
./certificate.sh as root.
edit apache2 and add "ssl" as per the following:
APACHE_MODULES="access actions alias auth auth_dbm autoindex cgi dir env
expires include log_config mime negotiation setenvif status suexec
Where can I learn what the Apache error messages mean?