indiWiz.com
SiteSearch:
Jump:

Site Map | WizTools.org | jCraze Blog
Web Developer's Den!
Home : WDD : ServerSide
This Article...
Print Version
Add Comment
View Comments
ServerSide
Apache on Linux
Apache User Directory Configuration
PostgreSQL Configuration
CGI: What and How?
PHP Jump Start Guide
Arrays in PHP
PHP and HTML Forms
Variable Passing in PHP
PHP 'include'
Drop-down Menu Navigation in PHP
Edit Your Site Online Using PHP
PHP MySQL Polling System
Dynamic, Search Engine Friendly Pages
Quot Ticker Using SSI
Regular Expressions Reference
PHP File Browser
PHP DB Deletion/Approval Script
Sections

Commniquè
Sign Guestbook!
Read Guestbook!
MailMe!

Apache User Directory

The following article deals with configuring a particular feature of Apache. The test machine ran RedHat 7.2.

Apache lets every UNIX system user to host his own page. This article deals with configuring such a system. Once this is successfully configured, the user can access his page thus:

http://hostname/~username/

The actual contents of the page should by default reside in the folder ``public_html''. If, as system administrator, you want to change the default name from ``public_html'' to say, ``mypage'', look for the following entry in the file /etc/httpd/conf/httpd.conf:

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

Change it to:

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

In a RedHat system, the UserDir feature is enabled by default. If you want to disable this feature for users ``sudhir'' & ``santha'', the following code has to be added in /etc/httpd/conf/httpd.conf:

UserDir disable sudhir santha

Instead, if you want to disable this feature to all users except ``subhash'' & ``sarat'', add the following:

UserDir disable
UserDir enable subhash sarat

Now restart the Apache web server:

# /etc/init.d/httpd restart

Troubleshooting

Even after configuring the above, if the page is not accessible, issue the following command:

$ chmod a+rx ~
$ chmod a+rx ~/public_html/

Yes, both your home directory and the UserDir should have global read and execute permission!

- Subhash.
July '02


User Comments

Add Comment

[Quick Stats: Number of main threads: 1, Number of sub-threads: 0]


Sign Guestbook | Who is Subhash?
The contents of this site are copyright© 2000-2008, indiWiz.com. All Rights Reserved.