| View previous topic :: View next topic |
| Author |
Message |
mikejd LXF regular
Joined: Fri Apr 08, 2005 5:46 pm Posts: 129 Location: Huntly, Aberdeenshire
|
Posted: Fri Apr 22, 2005 9:49 am Post subject: Setting up a web server |
|
|
I am setting up an old machine to use as a web server internally on my office network. This is for design purposes before uploading sites to a webhost. I am using MDK9.0 and Apache/php and have it running OK.
I can open the web server using 192.168.0.3:80 which opens the file at /var/www/html/index.shtml. I have replaced this file with my own index.html which is fine.
Question : I would like to keep the files for the web sites on /home and would like to know how to reference them. I have tried, temporarily, accessing a content management system at /home/mike/tmp/cinj152/index.php as a link but get a 404 error. What am I doing wrong?
Any advice welcome. TIA
Mike Davies |
|
| Back to top |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 7993 Location: Warrington, UK
|
Posted: Fri Apr 22, 2005 10:26 am Post subject: RE: Setting up a web server |
|
|
Change the DocumentRoot setting in Apache's config file - usually /etc/apache2/httpd.conf.
You will also need to change the <Directory> settings to suit. The file is well commented. _________________ Unix is user-friendly. It's just very selective about who it's friends are. |
|
| Back to top |
|
 |
Guest
|
Posted: Tue Apr 26, 2005 11:24 am Post subject: RE: Setting up a web server |
|
|
Thanks nelz.
I couldn't find the config file where you said but I think I found it at /etc/httpd/conf/httpd2.conf. There is a setting for DocumentRoot which I can change.
However, I couldn't find any reference in the file to <Directory>. Is this perhaps in a different file? |
|
| Back to top |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 7993 Location: Warrington, UK
|
Posted: Tue Apr 26, 2005 12:05 pm Post subject: RE: Setting up a web server |
|
|
Possibly. the location and number of Apache config files is a moveable feast, based on distro, Apache version, prevailing wind and other factors. The good news is that wherever they are, they are always kept together in one directory, so it will be in one of the files in /etc/httpd/conf/. _________________ Unix is user-friendly. It's just very selective about who it's friends are. |
|
| Back to top |
|
 |
nbnbn Guest
|
Posted: Sun May 15, 2005 6:05 pm Post subject: Re: RE: Setting up a web server |
|
|
|
|
| Back to top |
|
 |
skecs

Joined: Fri Apr 22, 2005 10:22 am Posts: 76 Location: Bathurst, NSW Australia
|
Posted: Mon May 16, 2005 9:17 am Post subject: RE: Re: RE: Setting up a web server |
|
|
Just a quick one - Apache files have moved to /etc/apache2 and the conf files have been restructured slightly. The setting you are looking for looks like this (in default-server.conf):
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
# To disable it, simply remove userdir from the list of modules in APACHE_MODULES
# in /etc/sysconfig/apache2.
....... some junk in here ........
UserDir public_html _________________ Regards from
Downunder!
.... _
... (0)>
... / /\
.. / / .)
.. V_/_
Linux Powered! |
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|