Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 24th, 2000, 08:47 AM
ccm ccm is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Location: Hong Kong
Posts: 73 ccm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 31 m 9 sec
Reputation Power: 9
hello

i have installed apache, and it is working on the document root.
But i cannot get it work with user's homepage.
it cannot open homepage at location www.hostname/~user

i have already made changes on the httpd.conf:

<IfModule mod_userdir.c>
UserDir public_html
</IfModule>
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
</Directory>

and the user public_html directory are already is public read, and public execute permission.

and it prompt me a message in a browser
"Forbidden

You don't have permission to access /~ccm on this server.

Apache/1.3.12 Server at 192.168.1.1 Port 80"

Reply With Quote
  #2  
Old September 25th, 2000, 12:58 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
If you are running Redhat, find the line "<Files ~>" in your httpd.conf and change it to "<Files ~ "^.ht">". If you don't see such line, then what is the exact permission for public_html?

Reply With Quote
  #3  
Old September 25th, 2000, 07:43 AM
ccm ccm is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Location: Hong Kong
Posts: 73 ccm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 31 m 9 sec
Reputation Power: 9
Hello freebsd

I checked the httpd.conf
the line
<Files ~ "^.ht">
Order allow,deny
Deny from all
</Files>
is already there.

and the permission of public_html is
drwxrwxr-x 2 ccm ccm 4096 Sep 1 17:19 public_html

I still cannot get it work....
strange....

Reply With Quote
  #4  
Old September 25th, 2000, 05:31 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
>>the line <Files ~ "^.ht"> is already there.

I was asking for this line -> "<Files ~>". Having <Files ~ "^.ht"> doesn't mean <Files ~> cannot be there.

If you are running Redhat, linuxconf has a known bug which add a line <Files ~> to your httpd.conf. You need to remove it.

>>drwxrwxr-x
This is 775 and it's fine.


[This message has been edited by freebsd (edited September 25, 2000).]

Reply With Quote
  #5  
Old September 26th, 2000, 09:23 AM
ccm ccm is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Location: Hong Kong
Posts: 73 ccm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 31 m 9 sec
Reputation Power: 9
Hello freebsd

i checked the httpd.conf again
and it dont have a line '<Files ~>'

indeed, i installed and compiled the apache from source.

i have no idea why the user html doc
is not working.

maybe i have to recompile the apache again.

Reply With Quote
  #6  
Old September 26th, 2000, 10:39 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
>>maybe i have to recompile the apache again

Can you access to your default web or is it just problem with user web?

Is there an index.html file or index.something? What is the permission of it?

What configure option did you give?
Maybe you should post your httpd.conf here (without all the lines that begin with #)

Reply With Quote
  #7  
Old September 27th, 2000, 07:41 AM
ccm ccm is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Location: Hong Kong
Posts: 73 ccm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 31 m 9 sec
Reputation Power: 9
Hello freebsd

I can access to the default webpage. http://192.168.1.1/
but not http://192.168.1.1/~ccm/

I have placed a file index.html in the directory /home/ccm/public_html
and the file permission is -rw-rw-r--

And here is my httpd.conf
ServerType standalone
ServerRoot "/usr/web/apache"
PidFile /usr/web/apache/logs/httpd.pid
ScoreBoardFile /usr/web/apache/logs/httpd.scoreboard
imeout: The number of seconds before receives and sends time out.
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
#KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 150
MaxRequestsPerChild 0
Port 80
User nobody
Group nobody
ServerAdmin cat33@iname.com
ServerName 192.168.1.1
DocumentRoot "/home/www"

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

<Directory "/home/www">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

<IfModule mod_userdir.c>
UserDir public_html
</IfModule>


<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>

</Directory>


<IfModule mod_dir.c>
DirectoryIndex index.php index.html
DirectoryIndex index.php index.html
</IfModule>

AccessFileName .htaccess

<Files ~ "^.ht">
Order allow,deny
Deny from all
</Files>

UseCanonicalName On

<IfModule mod_mime.c>
TypesConfig /usr/web/apache/conf/mime.types
</IfModule>

DefaultType text/plain
DefaultType text/plain

<IfModule mod_mime_magic.c>
MIMEMagicFile /usr/web/apache/conf/magic
</IfModule>

HostnameLookups Off

ErrorLog /usr/web/apache/logs/error_log

LogLevel warn

LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
LogFormat "%h %l %u %t "%r" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

CustomLog /usr/web/apache/logs/access_log common

ServerSignature On


<IfModule mod_alias.c>

Alias /icons/ "/usr/web/apache/icons/"

<Directory "/usr/web/apache/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>


ScriptAlias /cgi-bin/ "/home/cgi-bin/"

<Directory "/home/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Order allow,deny
Allow from all
</Directory>

</IfModule>

<IfModule mod_autoindex.c>


IndexOptions FancyIndexing


AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon /icons/unknown.gif
ReadmeName README
HeaderName HEADER
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

</IfModule>

<IfModule mod_mime.c>

AddEncoding x-compress Z
AddEncoding x-gzip gz tgz
AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .ee
AddLanguage fr .fr
AddLanguage de .de
AddLanguage el .el
AddLanguage it .it
AddLanguage ja .ja
AddCharset ISO-2022-JP .jis
AddLanguage pl .po
AddCharset ISO-8859-2 .iso-pl
AddLanguage pt .pt
AddLanguage pt-br .pt-br
AddLanguage ltz .lu
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .se
AddLanguage cz .cz
<IfModule mod_negotiation.c>
LanguagePriority en da nl et fr de el it ja pl pt pt-br ltz ca es sv
</IfModule>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
AddType application/x-tar .tgz
AddType text/vnd.wap.wml .wml
AddType text/vnd.wap.wmlscript .wmls
AddType image/vnd.wap.wbmp .wbmp
AddType application/vnd.wap.wmlc .wmlc
AddType application/vnd.wap.wmlscriptc .wmlsc
</IfModule>

<IfModule mod_setenvif.c>


BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4.0b2;" nokeepalive downgrade-1.0 force-response-1.0


BrowserMatch "RealPlayer 4.0" force-response-1.0
BrowserMatch "Java/1.0" force-response-1.0
BrowserMatch "JDK/1.0" force-response-1.0

</IfModule>
Allow from .your_domain.com


Reply With Quote
  #8  
Old September 27th, 2000, 08:55 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
>>What configure option did you give?

You haven't replied to my question.

Please try to access http://192.168.1.1/~ccm/ again and show me the error message from the error log.

In addition, your httpd.conf seems to be incompleted.

Reply With Quote
  #9  
Old October 11th, 2000, 11:42 AM
cgaskill cgaskill is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 1 cgaskill User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I don't know if this problem has been resolved for you or not, but I was having the same problem. Go into the public_html directory and check the permissions for directory .., it should be at least 755, as should public_html and all files/directory under public_html that you want them to have access to. You will probably have to actually do a "chmod 755 .." to change it.

Reply With Quote
  #10  
Old October 17th, 2000, 04:26 PM
BossChris BossChris is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 2 BossChris User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I am having the EXACT same problem. My /home/(user)/public_html directory and index.html file in it were bith CHMOD'd "777".
I have also seen reference to this problem in at least 5 other places - all without answer. Does anyine have the "~user" functionality working properly?

Thanks

Reply With Quote
  #11  
Old October 18th, 2000, 09:21 AM
BossChris BossChris is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 2 BossChris User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
PROBLEM SOLVED!
I have seen the problem described in this topic many, many times - in many, many forums. Everyone concentrates on the apache config file and permissions for the public_html directory and files it contains.
It seems that most people forget that the PARENT of public_html must also have appropriate permissions i.e. "744". That means CHMOD 744 ~user. Every suggestion I saw overlooked this. Anway, the Apache message was totally accurate - ~user was indeed the permission problem - not the directories and files under it.

Ahhh - progress!

Reply With Quote
  #12  
Old October 18th, 2000, 04:34 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
The fact is that /home/(user) where the (user) directory MUST be chmodded 755 by default by your OS. Nobody excepts root and that user himself should chmod it lower. In addition, 744 wouldn't work if Apache is run as nobody.

i.e.

#ls -Al /home
drwxr-xr-x 10 user user 512 Oct 18 12:00 user
drwxr-xr-x 10 user1 user1 512 Oct 18 12:00 user1
drwxr-xr-x 10 user2 user2 512 Oct 18 12:00 user2

In order for nobody to acces to user1 directory, user1 directory needs to be chmodded 005 (d------r-x) at the lowest possible permission. Keep in mind, the group of user1 is also user1.

So 744 wouldn't work in many situations, not just with Apache.

Should public_html be created by the user, its default permission would be drwx------ (700), then that user needs to chmod it to AT LEAST drwx---r-x (705) in order for nobody user to access it.
744 permission works with Apache if Apache is run as that user.

BTW, the last resort is to changing the following:

<IfModule mod_userdir.c>
UserDir public_html
</IfModule>

TO:

UserDir public_html

That is removing the <IfModule> blocks. If some errors generate after 'apachectl graceful' on that line, then your apache doesn't have mod_userdir support.

[This message has been edited by freebsd (edited October 18, 2000).]

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > cannot open user homepage


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT