Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 18th, 2001, 01:47 PM
peterw peterw is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Posts: 9 peterw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy ScriptAlias

I am running Apache on RedHat Linux 7.0. After setting up my server I made the recommended changes to the httpd.conf.

CGI & PHP should be working. Both have their ScriptAlias set.

The problem is that neither work and I keep getting a 403 Forbidden error.

Can someone help?

Peter

Reply With Quote
  #2  
Old August 19th, 2001, 04:58 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> CGI & PHP should be working. Both have their ScriptAlias set

Is it mod_php or standalone PHP CGI? If your cgi-bin is scriptalias'ed, you can't put anything other than CGI scripts in it, and its subdirectory recursively. That said, you can't put .htaccess, image, text file, html file, non-cgi.php file there.

>> The problem is that neither work and I keep getting a 403 Forbidden error

To solve your problem, you gonna need to provide more info in details since there are million of possibilities for your 403 error.

Reply With Quote
  #3  
Old August 20th, 2001, 08:17 AM
peterw peterw is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Posts: 9 peterw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
php is using mod_php

I did manage to get cgi working but not php within their ScriptAlias directories.

My ScriptAlias for php reads
ScriptAlias /php/ "/var/www/php/"

Do I need any special permissions set on the php files?

peterw

Reply With Quote
  #4  
Old August 20th, 2001, 09:06 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> ScriptAlias /php/ "/var/www/php/"

The directive ScriptAlias is dedicated for CGI scripts. mod_php's php script IS NOT CGI script.

>> Do I need any special permissions set on the php files?

Same permission as your plain html files and image files, -rw-r--r-- (644) normally. That said, php script is not CGI script, thus, you don't need to chmod it manually unless your umask is not 022.

Reply With Quote
  #5  
Old August 20th, 2001, 10:39 AM
peterw peterw is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Posts: 9 peterw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
If ScriptAlias does not work for php how do you have individual php directories for virtual hosting?

peterw

Reply With Quote
  #6  
Old August 20th, 2001, 05:10 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> how do you have individual php directories

By default, php is enabled globally and you can run it from anywhere. If you must specify it within a directory, then:

1) Remove this line globally -> AddType application/x-httpd-php .php

2) Add the following:

<Directory /www/vhosts/*/htdocs/php>
AllowOverride -FileInfo
Options All MultiViews
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
AddType application/x-httpd-php .php
</Directory>

Reply With Quote
  #7  
Old August 20th, 2001, 07:19 PM
peterw peterw is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Posts: 9 peterw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile

thank you for all your help

peterw

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > ScriptAlias


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT