By dropkickjunk
I have CentOs with Apache.
In my httpd.conf I have
<Directory /> Options FollowSymLinks AllowOverride None </Directory>
and further down
<VirtualHost *:80> ServerAdmin me@mydomain.com DocumentRoot /var/www/mydomain.com/public_html ServerName www.mydomain.com ServerAlias mydomain.com ErrorLog /var/www/mydomain.com-error_log CustomLog /var/www/mydomain.com-access_log common <Directory /> Options +FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
And in my .htaccess in my public_html folder I have at the top:
RewriteEngine On Options +FollowSymLinks
However, the links (e.g. a RewriteRule $ /error/mypage.htm [R=302,L]) are generated as:
/var/www/error/mypage.htm
rather than:
/var/www/mydomain.com/public_html/mypage.htm
any ideas?
thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi, well the one I’m using has one. Isn’t that enough? I’m not quite sure what AllowOverride All entails, is it safe to enable all this stuff? <br> <br>So with a ScriptAlias I now seem to have CGI path correct and executable, latest problem is I don’t have permissions to access (I have checked chmod and “apache” is the group user). <br> <br>Also all other files are still inaccessible due to incorrect path, as previously. <br> <br>I feel like I’m going round in circles!
OK I tell a lie, I’m getting myself confused. I did have this working last night but its no longer working when i got up this morning. The RewriteEngine being off just redirected to index.html hence my confusion.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.