I installed LAMP stack and followed the following tutorials to make my droplet ready I installed Wordpress on main domain and PHP script on subdomain! Wordpress is working well but when i open the subdomain index.php file load well but when i click on Login/Signup Page it gives me “Not Found The requested URL /app/login was not found on this server.” ! Same script works fine on shared hosting and now i want to switch to VPS but encounter this error! I contacted the script developer he said it’s due to .htaccess file not working or executed! System is using the default settiings and ignore the .htaccess file placed in subdomain! Please help me :')
Site Url: alphafire.me subdomain: alphafire.me/app
Tutorials Followed: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04 https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-16-04 https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lamp-on-ubuntu-16-04
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!
If your index.php file is loading properly on your php script but other pages are not this likely indicates an issue with your url redirects. On apache these are likely to be located in an .htaccess file in your web root.
In order for the redirects included in the .htaccess file to be used by Apache to route requests you need to ensure that your virtualhost configuration for this site uses:
AllowOverride All
rather than the default
AllowOverride None
This tells apache that it can use directives in the .htaccess file to override the default settings.
I just struggled with this for hours. Turns out my entire contents of var/www/html was placed inside an html.old folder instead of just html. that solved it
This answer on Stackoverflow solved the issue in my case:
"In case you are on Ubuntu, edit the file /etc/apache2/apache2.conf (here we have an example of /var/www):
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
and change it to;
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
then,
sudo service apache2 restart
You may need to also do sudo a2enmod rewrite to enable module rewrite."
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.