LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-23-2006, 07:02 AM   #1
klmbrt
Member
 
Registered: Jan 2005
Location: Arkansas
Distribution: Fedora 4 & Lunar
Posts: 43

Rep: Reputation: 15
directing apache server to a folder


I am new to using linux as a web server. I am using Fedora 2. I want to use it as an internal web server for working on projects. I have apache set up and I have all of my PHP programs in a specific folder on root. I want to know how to configure apache to look in that folder when I access localhost. I am also having trouble configuring MySQL to access my database files, like I said I'm really just getting started doing these things at home like this.
 
Old 01-23-2006, 07:53 AM   #2
nikm
LQ Newbie
 
Registered: Mar 2005
Posts: 24

Rep: Reputation: 15
Look into the configuration file for <Directory> tag.
You might see lots of them. Just copy one of them and make changes to point to your directory. Also add an Alias for the directory using the Alias command.

Alias /mysite/ "/path/to/your/direcotory/"
<Directory "/path/to/your/direcotory/">
.....
</Directory>

Now you can access this directory by
http://localhost/mysite
 
Old 01-23-2006, 07:18 PM   #3
klmbrt
Member
 
Registered: Jan 2005
Location: Arkansas
Distribution: Fedora 4 & Lunar
Posts: 43

Original Poster
Rep: Reputation: 15
Which configuration file?

/root/etc/httpd/config/

or maybe
/var/www/html/

or another

Last edited by klmbrt; 01-23-2006 at 07:20 PM.
 
Old 01-24-2006, 04:01 AM   #4
pk21
Member
 
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549

Rep: Reputation: 30
Just search in your httpd.conf for DocumentRoot and change it. Make sure apache has at least reading permission in the directory.
 
Old 01-24-2006, 05:50 AM   #5
klmbrt
Member
 
Registered: Jan 2005
Location: Arkansas
Distribution: Fedora 4 & Lunar
Posts: 43

Original Poster
Rep: Reputation: 15
That worked great! Do you have any advice on configuring mysql? Whenever I try to use TOra, I get unable to access, or access denied. I don't know where I'm suppose to set the password and user permissions at. Is there a better MySQL Manager than TOra?
 
Old 01-24-2006, 07:22 AM   #6
pk21
Member
 
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549

Rep: Reputation: 30
I don't know the program TOra. If you get an unable to access then check if mysql is running(/etc/rc.d/init.d/mysqld status).

To set the password from commandline you can use something like:

mysql -u root mysql
mysql> SET PASSWORD FOR username@hostname=PASSWORD('your_password');
 
Old 01-25-2006, 07:34 AM   #7
klmbrt
Member
 
Registered: Jan 2005
Location: Arkansas
Distribution: Fedora 4 & Lunar
Posts: 43

Original Poster
Rep: Reputation: 15
When I browse through the filesystem for (/etc/rc.d/init.d/mysqld status); I find the folder etc/rc.d/init.d and then there is some object in there called mysqld, which I can not open or I do not know how to open.

And when I go to the commandline and do this: mysql -u root mysql ; I get can not connect to /var/lib/mysql/mysql.sock ; and I can not even find the file mysql.sock in that file system directory. Am I missing something?
 
Old 01-25-2006, 07:55 PM   #8
klmbrt
Member
 
Registered: Jan 2005
Location: Arkansas
Distribution: Fedora 4 & Lunar
Posts: 43

Original Poster
Rep: Reputation: 15
I've got this so far but now my php scripts don't know how to locate the mysql database directory...

Any IDEAS???
 
  


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
Apache folder permissions anothernixconvert Mandriva 2 12-04-2005 11:55 PM
directing to different web page using htaccess? Homer Glemkin Linux - Software 0 01-03-2005 08:04 AM
Per folder Apache configuration coolman0stress Programming 1 01-04-2004 11:17 PM
Where is the htdocs folder for Apache? Ekim Gram Linux - Newbie 5 05-24-2003 07:16 AM
apache new folder link zeky Linux - General 6 09-01-2002 07:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:06 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
Open Source Consulting | Domain Registration