LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 06-01-2003, 11:28 PM   #1
Gear_freak2000
Member
 
Registered: Jun 2003
Posts: 90

Rep: Reputation: 15
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....
 
Old 06-01-2003, 11:47 PM   #2
linux_pioneer
Member
 
Registered: May 2003
Distribution: Solaris 10, Solaris 8.0, Fedora Core 3
Posts: 203

Rep: Reputation: 30
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.
 
Old 06-01-2003, 11:49 PM   #3
Gear_freak2000
Member
 
Registered: Jun 2003
Posts: 90

Original Poster
Rep: Reputation: 15
hey thanks...

my email address is james@cytoweb.co.uk

(if u have msn u can get me on gear_freak2000@hotmail.com)
 
Old 06-01-2003, 11:49 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
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.
 
Old 06-01-2003, 11:53 PM   #5
Gear_freak2000
Member
 
Registered: Jun 2003
Posts: 90

Original Poster
Rep: Reputation: 15
iv tryed using public_html... but that didnt work....
 
Old 06-01-2003, 11:55 PM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
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
 
Old 06-02-2003, 12:01 AM   #7
Gear_freak2000
Member
 
Registered: Jun 2003
Posts: 90

Original Poster
Rep: Reputation: 15
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.

Last edited by Gear_freak2000; 06-02-2003 at 12:03 AM.
 
Old 06-02-2003, 12:08 AM   #8
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
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>
 
Old 06-02-2003, 12:10 AM   #9
Gear_freak2000
Member
 
Registered: Jun 2003
Posts: 90

Original Poster
Rep: Reputation: 15
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
 
Old 06-02-2003, 12:14 AM   #10
Gear_freak2000
Member
 
Registered: Jun 2003
Posts: 90

Original Poster
Rep: Reputation: 15
what..... myone didnt work

ill try urs trickykid
 
Old 06-02-2003, 12:23 AM   #11
Gear_freak2000
Member
 
Registered: Jun 2003
Posts: 90

Original Poster
Rep: Reputation: 15
ok... fixed it by setting the chmod of home 2 755
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange apache trailing / problem - Slack-current, apache 1.3.33 vamp Linux - Networking 1 01-30-2005 08:28 PM
problem with apache 1.3.27 czarherr Linux - Software 2 01-10-2004 12:38 PM
RH9: PHP session problem (or Apache problem) fengcn Red Hat 0 12-01-2003 07:32 PM
perl problem? apache problem? cgi problem? WorldBuilder Linux - Software 1 09-17-2003 08:45 PM
apache benchmarks (apache v13 / apache v20) ; large differences between benchmarking markus1982 Linux - Software 0 02-08-2003 11:53 AM


All times are GMT -5. The time now is 10:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration