I just transferred a site over to Digital Ocean and all went smoothly except that the .htaccess file doesn’t work whereas it always worked on previous hosts.
I followed these instructions: https://www.digitalocean.com/community/articles/how-to-use-the-htaccess-file
… and made the one requested change, but it still doesn’t work. Could this be related to hosting multiple domain names on one droplet? What have I overlooked? Thank you.
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!
Are you using Apache or Nginx? <br> <br>In Apache you have to set <br>“AllowOverride All” in your main apache conf for the site directory. <br>Also the .htaccess file has to have permissions to be read by apache process (normaly user/group apache/apache or www-data/www-data) <br> <br>Nginx doesn’t use htacess, all configuration are on the server config. <br> <br>You can host the domains you want (apache virtualhosts) in one droplet has long you have resources (CPU, memory, connectivity, etc) for them.
Having the same issue as Biqa, can you tell me what I need to do exactly to provide the right permission to apache? <br> <br>Thanks, <br>Zak
Zak, <br> <br>You need to edit the AllowOverride directive either in your httpd.conf or vhosts.conf file. <br> <br>If you don’t use a separate vhosts file, then set ‘AllowOverride’ to ‘All’ in httpd.conf: <br> <br># AllowOverride controls what directives may be placed in .htaccess files. <br># It can be “All”, “None”, or any combination of the keywords: <br># Options FileInfo AuthConfig Limit <br># <br> AllowOverride All <br> <br>If you have a separate vhost.conf, then leave httpd.conf unchanged, but add the following lines to every domain in your vhost.conf file: <br> <br><Directory “/home/[username]/public_html”> <br>AllowOverride All <br></Directory> <br> <br>Put it right before </VirtualHost> closing tag and make sure to change the username. <br>
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.