Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Setting up a web server

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
mikejd
LXF regular


Joined: Fri Apr 08, 2005 5:46 pm
Posts: 131
Location: Huntly, Aberdeenshire

PostPosted: Fri Apr 22, 2005 9:49 am    Post subject: Setting up a web server Reply with quote

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
View user's profile Send private message Visit poster's website
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8450
Location: Warrington, UK

PostPosted: Fri Apr 22, 2005 10:26 am    Post subject: RE: Setting up a web server Reply with quote

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.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
Guest






PostPosted: Tue Apr 26, 2005 11:24 am    Post subject: RE: Setting up a web server Reply with quote

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
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8450
Location: Warrington, UK

PostPosted: Tue Apr 26, 2005 12:05 pm    Post subject: RE: Setting up a web server Reply with quote

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/.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
nbnbn
Guest





PostPosted: Sun May 15, 2005 6:05 pm    Post subject: Re: RE: Setting up a web server Reply with quote

Back to top
skecs



Joined: Fri Apr 22, 2005 10:22 am
Posts: 76
Location: Bathurst, NSW Australia

PostPosted: Mon May 16, 2005 9:17 am    Post subject: RE: Re: RE: Setting up a web server Reply with quote

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 user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast