Question
Using Ubuntu 16.04 LAMP
keep getting this: The requested URL was not found on this server. After setting up name servers and A record.
I set up name servers on GoDaddy and the A record and nameserver on digital ocean but still am getting not found. I tested the connection from command line with host command for all three digital ocean servers and I get the correct IP address back. Also, tested this with host command with ISP and also received the correct IP address. I can also access the website from a browser with the IP but not domain name. Any help would be greatly appreciated!
Submit an answer
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!
Sign In or Sign Up to Answer
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.
I have had the same problems for a long day. The following command should work perfectly.
I installed Lamp and phpmyadmin using:
$ sudo apt install phpmyadmin
Now, open your terminal and do the following two commands.
- sudo -H gedit /etc/apache2/apache2.conf
In this apache2.conf file add this following line anywhere:
Include /etc/phpmyadmin/apache.conf2. Now, restart your apache
/etc/init.d/apache2 restartNow, your //localhost/phpmyadmin/ work properly
Happy Coding… :) cheers
The frontend just work fine. But when I call the backend //localhost/craft3/web/admin/dashboard/ or //localhost/craft3/web/admin/ I get the error requested URL was not found on this server. Apache/2.4.18 (Ubuntu) Server at localhost Port 80. The admin-folder doesn't exist in web-folder. I searched here for this problem, but they had problem with frontend.
- craft3
- php
asked Jul 21, 2020 at 0:02
LukyLuky
311 silver badge3 bronze badges
1
1 Answer
answered Jul 21, 2020 at 7:54
LukyLuky
311 silver badge3 bronze badges
When you install Apache2 on a Linux server. At that time mod_Rewrite module is not enabled by default on apache 2. And of which website or app you run on the server, and you open any url of this, then you see the message “the requested url was not found on this server apache2 ubuntu”.
So in the tutorial “the requested url was not found on this server apache2 ubuntu” you will learn how to enable rewrite_module and solve this error.
The apache Mod_rewrite is very popular for rewriting human-readable URLs in dynamic websites. This makes the URL’s look cleaner and SEO friendly on websites. In this tutorial, we will show you how to enable the Apache 2 mod_rewrite module and configure it for use .htaccess files available with apache ubuntu web server.
How to enable rewrite module in apache ubuntu 16.04/18.04/20.04
Step 1 – Update dependencies
If you are not installed apache 2 in ubuntu. So, you can use the following command to install apache 2 web server:
sudo apt-get updateStep 2 – Enable mod_rewrite Apache By a2enmod Command
If you want to enable mod_rewrite apache in ubuntu. So, you can connect your instance or web server to ssh terminal. And then type a2enmod command to enable any modules in Apache 2 web server:
sudo a2enmod rewriteStep 3 – Allow .htaccess File for VirtualHost
After successfully enable the Apache 2 rewrite module. Then you need to add this “AllowOverride All” in your VirtualHost configuration file.
Note that – The main reason is to enable or allow .htaccess file in the Apache server. Because it does not allow by default. So, you can not use of ‘.htaccess’ file.
So, open your terminal and type the following command:
sudo nano /etc/apache2/sites-available/000-default.confThen you need to add this “AllowOverride All” in your VirtualHost configuration file like below
<VirtualHost *:80> ServerName www.example.com DocumentRoot /var/www/html <Directory /var/www/html> Options Indexes FollowSymLinks AllowOverride All </Directory> </VirtualHost
Step 4 – Restart Apache 2
If you have follow above 3 steps successfully. Now, You need to restart Apache 2 server to restart all configuration to the running environment.
sudo systemctl restart apache2Congratulation!! you have successfully enabled/allowdc mod_rewrite in apache 2 web server.
Recommended Tutorials
My name is Devendra Dode. I am a full-stack developer, entrepreneur, and owner of Tutsmake.com. I like writing tutorials and tips that can help other developers. I share tutorials of PHP, Python, Javascript, JQuery, Laravel, Livewire, Codeigniter, Node JS, Express JS, Vue JS, Angular JS, React Js, MySQL, MongoDB, REST APIs, Windows, Xampp, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL and Bootstrap from a starting stage. As well as demo example.
View all posts by Admin