LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   Localhost web server setup? (https://www.linuxquestions.org/questions/suse-opensuse-60/localhost-web-server-setup-411753/)

DoctorWynn 02-04-2006 09:48 PM

Localhost web server setup?
 
Ok, I've got apache running, phpmyadmin, and I know how to use my /srv/www/htdocs folder to host websites on my machine. However, what I can't figure out, is how to use my public_html folder to host a website. That's what I'm trying to acheive. I'm not using it for the web, just localhost so that I can test changes to my real site hosted elsewhere. I want to try new themes and what not for MdPro, but don't want to do it "live." I want to test them on my machine so I can make sure it's all good.

I know I can just use the /srv/www/htdocs folder (/srv/www/htdocs/mdpro), but I would really prefer to use the /home/tom/public_html, since it's there, and I don't have to worry about changing folder permissions in order to make changes since it's in my home folder.

So basically, rather than set it up to http://localhost/mdpro, I wish to use http://localhost/tom. See what I'm sayin?

Oh, forgot to mention I'm using Suse 10.0 release version under KDE 3.5.

What is the step I'm missing here? Thanx!

bulliver 02-05-2006 04:37 AM

http://httpd.apache.org/docs/2.0/howto/public_html.html

DoctorWynn 02-05-2006 09:23 AM

Quote:

Originally Posted by bulliver

Ok, that's what I was looking for! However, I've looked into it, and my userdir module is already enabled, but it still doesn't work. I also can't find where I set it to "public_html" if it isn't already. I realized as well through that link you gave me that I wuz using the incorrect syntax by not including the tilde symbol (http://localhost/~tom). When I go to it now, I get this error,

----------------------------
Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.
Error 403
----------------------------

And from reading that page and the related ones, I can't figure out what else I have to do.

Thanx again!

bulliver 02-05-2006 01:40 PM

Right, that's because your home directory has 700 permissions, and the webserver, which probably runs as 'nobody' or 'apache' needs to read the files there. You need to change permissions of your /home/username directory to 701 and the public_html directory to the same. Plus of course all files _in_ the public_html directory must be readable by apache.

If you don't like the security implications of this (and I know I don't) you can change the group owner of these directories to the apache group and have them 710 instead.

Sorry, I thought that would be mentioned in the guide.


All times are GMT -5. The time now is 01:24 PM.