LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-23-2005, 11:50 PM   #1
partyk1d24
Member
 
Registered: Jun 2005
Location: Orlando, Fl
Posts: 41

Rep: Reputation: 15
Trying to configure apache


Ok I'm coming over from IIS world to Apache since I switched to the light-side and I can't figure out how to set it up. I installed it and tested it and http://localhost goes to the apache welcome screen. Now how do I redirect the localhost to the index.html file in the /home/<usrName>/WebSite/ dir? I don't think I'm stupid but I can't figure out the online tutorials.

Thanks guys
 
Old 06-24-2005, 12:17 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Never used it, never looked at a tutorial for it, but
thought this looked quite clear...

From /etc/apache2/httpd.conf
Code:
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
UserDir public_html

#
# Control access to UserDir directories.  The following is an example
# for a site where these directories are restricted to read-only.
#
#<Directory /home/*/public_html>
#    AllowOverride FileInfo AuthConfig Limit Indexes
#    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
#    <Limit GET POST OPTIONS PROPFIND>
#        Order allow,deny
#        Allow from all
#    </Limit>
#    <LimitExcept GET POST OPTIONS PROPFIND>
#        Order deny,allow
#        Deny from all
#    </LimitExcept>
#</Directory>

Cheers,
Tink
 
Old 06-24-2005, 12:30 AM   #3
partyk1d24
Member
 
Registered: Jun 2005
Location: Orlando, Fl
Posts: 41

Original Poster
Rep: Reputation: 15
Ok so now it looks like this

Code:
#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
UserDir /home/partyk1d24/WebSite
WebSite is the dir and the file inside it is Index.html but when I go to localhost I still get the Apache welcome screen. So what am I doing wrong?
 
Old 06-24-2005, 12:52 AM   #4
Harlin
Member
 
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316

Rep: Reputation: 30
This configuration you've shown is good for a url like: http://localhost/~username.

However, if you're wanting to show your home dir web as the *index* for your apache, you'll need to change the document root setting although this is NOT advised and would actually make little sense. However, it is *your* system and you can do what you like.
 
Old 06-24-2005, 12:54 AM   #5
yoursmile
LQ Newbie
 
Registered: Jun 2005
Posts: 26

Rep: Reputation: 15
1. please tell me version of your apache.
2. you must restart apache after modify httpd.conf

I think yours apache on running can`t be your httpd.conf which modified.
 
Old 06-24-2005, 02:09 AM   #6
partyk1d24
Member
 
Registered: Jun 2005
Location: Orlando, Fl
Posts: 41

Original Poster
Rep: Reputation: 15
I am running apache 2.0
 
Old 06-24-2005, 02:41 AM   #7
yoursmile
LQ Newbie
 
Registered: Jun 2005
Posts: 26

Rep: Reputation: 15
modify httpd.conf:

Code:
#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
UserDir WebSite
notice:red word

after UserDir , no "/home/partyk1d24/"

website link :
http://localhost/~partyk1d24

Good Lucky!
 
Old 06-24-2005, 03:16 AM   #8
Harlin
Member
 
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316

Rep: Reputation: 30
If I understood your first request correctly, you were wanting to be able to pull up http://localhost in your browser and have it point to this ~ dir. This is still not going to do it unless you change your root document or create a vhost called 'localhost' and have it point to the dir of your choice. If I'm wrong, please point it out, but I don't think the last things posted will work as desired.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Configure Apache Megasms Programming 3 11-04-2005 05:36 AM
configure apache tux66 Slackware 11 05-02-2005 03:49 PM
how to configure apache Roll Linux - Software 1 03-06-2005 11:14 AM
Configure Apache esasse Linux - Newbie 2 12-02-2004 02:51 PM
cant configure apache dave bean Slackware 8 02-23-2004 08:38 PM


All times are GMT -5. The time now is 11:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration