On Tue, 1 May 2001, Yi-chen Lan wrote:
> Hi,
> I've just installed RedHat 7 and Apache Server, I can see the information
> page from browser (127.0.0.1), now I would like to place my own html files
> (index.html). Which directory should I place the html files?
> Many thanks!
> YC
The apache configuration file: /etc/httpd/httpd.conf has an entry for:
DocumentRoot /var/www/html
You can change this to whatever you wish. If you do so, you must
restart httpd: /etc/rc.d/init.d/httpd restart.
The default it /var/www/html
and there is most likely a default index.html file already there
(the one that says: Test Page..., which shows your web server is
working....)
You can test it by pointing a web browser on your machine to:
http://localhost
Now, you can go edit this file or replace it with your own.
You can also make subdirectories here and place web pages.
As mentioned elsewhere, your users can have their own individual web pages
if they create a subdirectory in their home directory called: public_html
and in this case the pages are accessed by:
http://localhost/~yourusername (externally accessed with your machine's
DNS name or IP number instead of localhost).
The special subdirectory name can also be changed in httpd.conf file.
However, it is not often done.
As mentioned above, /var/www/html is now the default location for your
web documents. (Prior to RH 7.0, it was located in /home/httpd/html.)
One word of caution however with using /var/www/html as the
location: if you do a RedHat re-installation, (not an update),
your web pages might be overwritten: /var might be re-formatted unless
you take care, and your index.html file might be overwritten with the
default index.html file again. There are some reasons why the default was
moved from /home to /var, but the issue of re-installation is a
strong reason to NOT do this. It would be a safe thing to place them /home,
because /home won't be reformatted by default if you re-install. However,
there is a slight amount of extra work to make the directories, change
their ownerships, and edit httpd.conf. Take your pick. /var/www/html is
the least amount of work, for now. Just remember to be careful later
before you do a re-installation.
***************************************************************************
Jerry Winegarden OIT/Technical Support Duke University
[EMAIL PROTECTED] http://www-jerry.oit.duke.edu
***************************************************************************
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list