Suse 10.1 - Apache "Access Forbidden!" on any page
I've been battling with this for best part of three days now, apologies for the long post, and apologies for any stupidity, I'm very new to Linux...
How I got to my problem: Installed Suse 10.1 (first ever try with anything linux) Installed Xampp - worked fine but I needed mySQL4 and fancied doing a 'proper' setup. Uninstalled Xampp Not entirely sure of the exact order but in around about way something like this happened: - nothing worked (coudln't get any pages served) - php scripts worked & pages were hosted - phpMyAdmin worked with security warnings - fixed security issues - nothing worked - everything worked - tried to use Yast http server management to setup multiple virtual hosts - nothing worked Now all i can get is : Code:
Access forbidden! Thanks for all the suggestions, but I appear to have completely screwed things up. Sorry for the long post but trying to provide as much info as possible so someone might be able to spot the mistake: Not running the same IP as a printserver. Apache is installed: - Code:
buster2:/etc # rpm -q apache2 relevant selection: Code:
buster2:/etc # ps -ef Code:
buster2:/etc # cd /srv/www/htdocs here is my /etc/apache2/httpd.conf file Code:
# |
Woah! Well, I couldn't see anything wrong by scanning through your post information. It could be just something simple you've missed, however with all of the changing of configurations, etc... it seems like uninstalling apache/php/phpmyadmin/mysql/xampp/whateverelseyouinstalled and starting over may be a good idea.
I don't know if this will help at all, but I've configured this stuff numerous times on SuSE 10 and I do it pretty much the same way every time; if you follow these steps you shouldn't have to worry about using something like xampp and it may just help fix your issue: 1. Install apache2 through YaST (plus prefork/worker dependencies) -- I usually don't do this from the Network Services --> HTTP Server setup, but just type "apache2" in the yast software management panel to find and install it 2. Make sure you start apache up (/etc/init.d/apache2 start) and then put a simple index.html file in your /srv/www/htdocs directory. Open it in a browser locally (http://localhost) and see if you can see it. (Remember if you want to access your pages from a machine other than the one you are on you need to enable HTTP traffic in your firewall settings). 3. Install PHP5 and the apache_php5 module (again from YaST software management) 4. If you want, add index.php to your apache conf file (DirectoryIndex index.html index.php index.html.var) 5. Restart apache (/etc/init.d/apache2 restart) 6. Put a simple test.php file (something like <?php phpinfo(); ?>) in your /srv/www/htdocs/ directory. 7. Open up your local browser again (http://localhost/test.php) and make sure apache serves that page correctly 8. Install mysql through YaST software management and make sure it is running (/etc/init.d/mysql start) 9. Now go to phpmyadmin.net and download the latest phpMyAdmin tar file (I always get it from here because I have had numerous problems trying to install phpMyAdmin from YaST) 10. Install phpMyAdmin (basically untar in your /srv/www/htdocs/ directory and rename to "phpMyAdmin" or whatever you want) 11. Change your phpMyAdmin user and password settings and permissions to get rid of those security warnings 12. Restart apache again and access your localhost/phpMyAdmin page. Well, that's about it. Once you get to that point I would recommend setting up your virtual hosts, etc... Hope that helps. |
I had just tried starting again from scratch, basically i:
uninstalled apache, uninstalled phpMySql, uninstalled mysql all using Yast. Then deleted the entire /etc/apache2 folder. I then reinstalled everything using yast and I get the same REALLY frustrating error. However I will try your approach and follow it to the T. Thanks |
Hello,
It would be usefull if you could post what is inside in your /etc/apache2/default-server.conf -file. This because I do not see any document root in your httpd.conf and there is Code:
# forbid access to the entire filesystem by default |
Yep, the problem often exists with making sure that a directory is readable.
For example, if your pages are in /home/website, in order for the webserver to display them, two things need to happen: the webserver has to be told where they are (either through DocumentRoot or through a Virtual Server), and then the "allow from all" directive has to be set in httpd.conf. Here's a typical example: <Directory "/home/website"> AllowOverride All Order allow,deny allow from all </Directory> Only setting permissions is not going to be enough. Hope this helps |
All times are GMT -5. The time now is 04:21 PM. |