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
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
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):and change it to;
then,
You may need to also do
sudo a2enmod rewrite
to enable module rewrite."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:
rather than the default
This tells apache that it can use directives in the .htaccess file to override the default settings.
Yes, but in my case, the offline page appears, for example: The page does not work Currently, xat1.ml cannot process this request. HTTP ERROR 500
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 works perfectly for me. Thank you.