LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-10-2003, 06:00 PM   #1
d_lake
Member
 
Registered: Feb 2003
Location: Alabama
Distribution: Slackware
Posts: 43

Rep: Reputation: 15
configuring apache


Ok, where in the httpd.conf do i put this line
" AddType application/x-httpd-php .php"

Also i cant access webpages in my "public_html" in my home dir. it says forbidden when i try to access it. So what do i do to get it where i can access it, i have tried "modprobe 755 public_html" but that didnt work.
 
Old 05-10-2003, 06:08 PM   #2
green_dragon37
Member
 
Registered: Oct 2002
Location: Lower Alabama
Distribution: Slackware, OpenBSD 3.9
Posts: 344

Rep: Reputation: 31
You can just throw that line in anywhere, I put mine directly above my AddHandler lines. Also, "modprobe??" I sure hope that was a typo. Is your index page in that dir readable, and is userdir enabled in your conf?

Ian
 
Old 05-10-2003, 06:25 PM   #3
d_lake
Member
 
Registered: Feb 2003
Location: Alabama
Distribution: Slackware
Posts: 43

Original Poster
Rep: Reputation: 15
Oh sry i ment chmod 755, and yes the page is readable and userdir is enabled.
 
Old 05-10-2003, 06:31 PM   #4
green_dragon37
Member
 
Registered: Oct 2002
Location: Lower Alabama
Distribution: Slackware, OpenBSD 3.9
Posts: 344

Rep: Reputation: 31
Interesting, do the userdir-relevant lines look like this?
Code:
<IfModule mod_userdir.c>
    UserDir public_html
</IfModule>
And, do you have any specific directory lines pertaining to that directory?

Ian
 
Old 05-10-2003, 06:38 PM   #5
d_lake
Member
 
Registered: Feb 2003
Location: Alabama
Distribution: Slackware
Posts: 43

Original Poster
Rep: Reputation: 15
The lines are exactly as you specified and i dont think i have any specific directory lines pertaning to that directory.
 
Old 05-10-2003, 06:43 PM   #6
green_dragon37
Member
 
Registered: Oct 2002
Location: Lower Alabama
Distribution: Slackware, OpenBSD 3.9
Posts: 344

Rep: Reputation: 31
chmod a+x your home directory and see if that does it.

Ian
 
Old 05-10-2003, 06:52 PM   #7
d_lake
Member
 
Registered: Feb 2003
Location: Alabama
Distribution: Slackware
Posts: 43

Original Poster
Rep: Reputation: 15
no that didnt work and i did it to my home dir and public_html and still nothing
 
Old 05-10-2003, 07:03 PM   #8
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Did you make the changes to your httpd.conf file your self regarding the "UserDir" and if so, did you restart the httpd server?


apachectl configtest <~~~~ To test your changes before starting
apachectl restart <~~~~~~ To restart the server

What exactly are you typing to try and gain access to your User's home directory in public_html? Are you trying something like:

http://<domain.com>/~user1
 
Old 05-10-2003, 07:10 PM   #9
d_lake
Member
 
Registered: Feb 2003
Location: Alabama
Distribution: Slackware
Posts: 43

Original Poster
Rep: Reputation: 15
No, i havent modified the httpd.conf file and i ran "apachectl configtest" it said it was ok.
I restarted httpd and still didnt work.
I am trying to access it with "http://slacker/~david" .
 
Old 05-10-2003, 07:48 PM   #10
green_dragon37
Member
 
Registered: Oct 2002
Location: Lower Alabama
Distribution: Slackware, OpenBSD 3.9
Posts: 344

Rep: Reputation: 31
What version af appache are you running, and does your conf have this line(or similar).
LoadModule userdir_module modules/mod_userdir.so

Ian
 
Old 05-10-2003, 08:12 PM   #11
green_dragon37
Member
 
Registered: Oct 2002
Location: Lower Alabama
Distribution: Slackware, OpenBSD 3.9
Posts: 344

Rep: Reputation: 31
You could try to comment out all existing lines pertaining to UserDir, and just add the line:
Code:
 UserDir public_html
Here is a link that shows some of what you can do with this directive:
http://httpd.apache.org/docs/mod/mod_userdir.html

Ian
 
Old 05-11-2003, 09:38 AM   #12
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally posted by d_lake
I am trying to access it with "http://slacker/~david" .
Is the server named "slacker" or is that your computer name? Have you tried maybe http://127.0.0.1/~david

Or maybe with the actual IP address of your machine like: http://192.168.1.2/~david
 
Old 05-11-2003, 06:20 PM   #13
d_lake
Member
 
Registered: Feb 2003
Location: Alabama
Distribution: Slackware
Posts: 43

Original Poster
Rep: Reputation: 15
Ok i cant get php to work either so can someone lead me through the install with every detail i need to know to get it to work. I want to install Apache+PHP+MYsql, but i have mysql installed and running good.
 
Old 05-11-2003, 08:10 PM   #14
green_dragon37
Member
 
Registered: Oct 2002
Location: Lower Alabama
Distribution: Slackware, OpenBSD 3.9
Posts: 344

Rep: Reputation: 31
For PHP you need at least these lines in your httpd.conf:

LoadModule php4_module modules/libphp4.so
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 524288
</Files>
AddType application/x-httpd-php .php
 
Old 05-12-2003, 08:33 AM   #15
restless
Member
 
Registered: Feb 2003
Location: Belgium
Distribution: Debian
Posts: 166

Rep: Reputation: 31
take a look at this thread, that will help you.. it did help me

http://www.linuxquestions.org/questi...threadid=54320

you have to make a map in the /var/www/ directory named "~david"
now you can access it with http://localhost/~david

Last edited by restless; 05-12-2003 at 08:35 AM.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Configuring apache NeoAndersn007 Debian 7 03-27-2005 05:31 PM
Configuring Apache desarrolladores Linux - Software 4 06-29-2004 01:14 PM
Configuring Apache :( shoombool_tala Linux - Software 5 04-12-2004 05:30 PM
Configuring Apache Iain Wilson Linux - Newbie 1 09-11-2003 08:16 AM
Need a little help configuring apache... tarballed Linux - Software 1 08-30-2003 01:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:31 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