LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Apache problem (https://www.linuxquestions.org/questions/linux-newbie-8/apache-problem-63133/)

Gear_freak2000 06-01-2003 10:28 PM

Apache problem
 
yep... im new... just installed redhat 9.0 (its 04:30am at the moment) and im getting pretty stressed....

How do i configer apache so that if say i go 2 http://myip/~bob/bob.html

it will open /home/bob/www/bob.html

i thought that it did this automaticly... but it dont....

i can go 2 http://myip/ and i get the apache test page....

linux_pioneer 06-01-2003 10:47 PM

go into /var/www/html/index.html, that is the test page,
check out your httpd.conf file in /etc/httpd/conf. You should specify that apache will allow user webpages to be seen in ~/public_html. If you want to see my httpd.conf file just give me your email address and I'll send it to you. It will give you a good idea of how to set it up.

Gear_freak2000 06-01-2003 10:49 PM

hey thanks...

my email address is james@cytoweb.co.uk

(if u have msn u can get me on gear_freak2000@hotmail.com)

trickykid 06-01-2003 10:49 PM

You need this specified in your httpd.conf configuration file.

# UserDir: The name of the directory which is appended onto a user's home
# directory if a ~user request is received.
#
<IfModule mod_userdir.c>
UserDir www
</IfModule>

By default its usually UserDir public_html but if you specify the directory as www to place your users html files in above should work for ya.

Gear_freak2000 06-01-2003 10:53 PM

iv tryed using public_html... but that didnt work....

trickykid 06-01-2003 10:55 PM

Quote:

Originally posted by Gear_freak2000
iv tryed using public_html... but that didnt work....
Like I said, if you have a directory called www with bob.html in it, change your UserDir to go to www like I displayed in my first reponse. And after making changes, restart apache as root.

apachectl restart

Gear_freak2000 06-01-2003 11:01 PM

ok... i got that sorted... thanks for all your help!

but now i get

Forbidden
You don't have permission to access /~bob/index.html on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

trickykid 06-01-2003 11:08 PM

Quote:

Originally posted by Gear_freak2000
ok... i got that sorted... thanks for all your help!

but now i get

Forbidden
You don't have permission to access /~bob/index.html on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Check your permissions and make sure they are readable. If not make sure you have something like this or add this in your httpd.conf config:
Code:

#
# Control access to UserDir directories.  The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory /home/*/www>
    AllowOverride FileInfo AuthConfig Limit
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    <Limit GET POST OPTIONS PROPFIND>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS PROPFIND>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>


Gear_freak2000 06-01-2003 11:10 PM

Why do I get a "Forbidden/You don't have permission to access / on this server" message whenever I try to access my server?
Search your conf/httpd.conf file for this exact string: <Files ~>. If you find it, that's your problem -- that particular <Files> container is malformed. Delete it or replace it with <Files ~ "^\.ht"> and restart your server and things should work as expected.

This error appears to be caused by a problem with the version of linuxconf distributed with Redhat 6.x. It may reappear if you use linuxconf again.

If you don't find this string, check out the previous question.


found how 2 fix it :)

Gear_freak2000 06-01-2003 11:14 PM

what..... myone didnt work

ill try urs trickykid

Gear_freak2000 06-01-2003 11:23 PM

ok... fixed it by setting the chmod of home 2 755


All times are GMT -5. The time now is 07:25 AM.