ScriptAliasMatch apache
ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+) /home/$1/cgi-bin/$2
will map a request to http://example.com/~user/cgi-bin/script.cgi to the path /home/user/cgi-bin/script.cgi and will treat the resulting file as a CGI script. I want to access http://example.com/cgi-bin/script.cgi as my path is /home/user/www/cgi-bin/script.cgi what changes i have to make in ScriptAliasMatch condition. |
Hi,
If you want to map the main apache cgi-bin directory to a specific user cgi-bin directory you don't need ScriptAliasMatch. ScriptAlias is enough Code:
ScriptAlias /cgi-bin/ "/home/user/www/cgi-bin/" Code:
ScriptAliasMatch ^/cgi-bin/(.*) "/home/user/public_html/cgi-bin/$1 |
Thanks for the help.
I try both the option but it did not work . I also try this one RewriteEngine on RewriteBase / RewriteCond %{REQUEST_URI} !~ RewriteCond %{REQUEST_URI} ^\/.*\.pl$ RewriteCond %{DOCUMENT_ROOT} \/home\/mst3k\/public_html RewriteRule ^(.*)$ /~mst3k/$1 [L] but it also didnt work |
What exactly are you trying to do and how it's not working. Check apache logs to see what's happening
If you want a request for http://example.com/cgi-bin/script.cgi to be served from the cgi directory in /home/mst3k/public_html/cgi-bin, then you need the just ScriptAlias above modified like this (added the specific username) Code:
ScriptAlias /cgi-bin/ /home/mst3k/public_html/cgi-bin/ |
All times are GMT -5. The time now is 09:01 PM. |