I have an ad delivery system that uses a folder currently in my web folder but I want to move it below the web root and still have it accessible with a URL, is this possible, do I need to alter my httpd.conf file?
coopster
1:23 pm on Jul 13, 2010 (gmt 0)
You could use an alias. Don't forget permissions.
optik
2:32 pm on Jul 13, 2010 (gmt 0)
That's worked except the ad program is saying one of the folders is not writable even though the permissions are set correctly, this is what I added to my httpd.conf file
Alias /ads "/home/site/ads"
<Directory "/home/site/ads"> Options +Indexes AllowOverride None Order allow,deny Allow from all </Directory>
coopster
6:15 pm on Jul 14, 2010 (gmt 0)
Double check the permissions. Also, if you are trying to run a script against that directory you must be certain that the server-side scripting language doesn't have any directives blocking you.
optik
8:51 pm on Jul 14, 2010 (gmt 0)
The permissions are definitely ok, it's a PHP based application although I wouldn't know what directive would affect reading folder permissions.
I've tried setting open_basedir to include the ad app folder and it made no difference, when I go to it's admin page it's running PHP fine so I don't think that's the issue, it's giving an error about folder permissions but this error is created by the app not PHP.
coopster
12:38 am on Jul 16, 2010 (gmt 0)
The app and PHP will normally both be the same user and/or group because the app will run under the apache user. Set your permissions accordingly and you should be good to go.
optik
8:21 am on Jul 16, 2010 (gmt 0)
Sorry which permissions, the folder permissions in question are set correctly or do you me some other permissions?
optik
5:27 pm on Jul 16, 2010 (gmt 0)
Ok I've found a solution but don't quite know how to implement it, basically I all I have to do is leave the images folder in question above the web root but as this being aliased I need to use aliasMatch to exclude this one folder whilst aliasing the app folder it's contained in.
I have no idea how to write that as a reg expression though.
coopster
12:32 am on Jul 17, 2010 (gmt 0)
it's giving an error about folder permissions but this error is created by the app not PHP
Can you locate the line in the script that is causing this error? If so you should be able to work backward from there to determine the issue.
optik
6:55 am on Jul 17, 2010 (gmt 0)
I've gone down that route and have discovered what the problem is, the app is pulling the folder info from the URL so it thought permissions were wrong because there wasn't even a folder there!
My solution was just to move everything under the root except for this one folder, which is used for storing the actual ad images, that got rid of the permissions error but now if I add a new image it adds nothing without giving an error.
Going down this road is looking like a wild goose chase and I may just have to reconsider my options.