404 Not Found The requested URL was not found on this server

I have small problems and I was wondering if anyone could help me on the hump. I pulled out a copy of the website from Hostgator and I try to configure it on my local machine using WAMP , but when I try to access the site, I continue to receive an error message. Here is what I tried .. I went to the Apaches httpd.conf file and uncommented # from the LoadModule modules rewrite_module / mod_rewrite.so. Also I changed AllowOverride None for everyone. With that said, I'm not sure what else to look for. Please note that in my application my httaccess files httaccess not have (.) front of them (.htaccess) . I'm not sure if it's worth noting or not. Any ideas on what I need to do to access my site? When I access the application, I see the cached version (white screen), but when I click on the login link, I see 404 Not Found .

+12
source share
10 answers

In the httpd.conf file you need to delete #

 #LoadModule rewrite_module modules/mod_rewrite.so 

after deleting the line # will look like this:

 LoadModule rewrite_module modules/mod_rewrite.so 

I am sure your problem will be solved ...

+16
source

change this value

 Include conf/extra/httpd-vhosts.conf 

to

 #Include conf/extra/httpd-vhosts.conf 

and restart all services

+12
source

If your .htaccess file is OK and the problem remains, try including the AllowOverride directive in your httpd.conf. If the AllowOverride directive is set to None in the Apache httpd.config file, then .htaccess files are completely ignored. An example of the allowed AllowOverride directive in httpd.config:

  <Directory /> Options FollowSymLinks **AllowOverride All** </Directory> 

To do this, restart the server.

+5
source

In wamp / alias / mySite.conf, be careful to add a slash "/" at the end of the alias address:

Replace:

 Alias /mySite/ "D:/Work/Web/mySite/www" 

By:

 Alias /mySite/ "D:/Work/Web/mySite/www/" 

Or index.php is not reading correctly.

+4
source

In Ubuntu I did not find httpd.conf , now it may not work longer. Edit the apache2.conf file working for me.

 cd /etc/apache2 sudo gedit apache2.conf 

Here in apache2.conf change

 <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> 

in

 <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> 
+2
source

To save the file as .htaccess, when using windows, you need to open notepad and then save .htaccess, since windows do not create files starting with a dot. This should make your .htaccess work, and it will fix the problem.

By the way, to get specific error messages, set Configure::write('debug', 0); to '2' in app/config/core.php Configure::write('debug', 0); to '2' in app/config/core.php for development purposes.

+1
source

Just solved this problem! I know the question is quite old, but I had the same problem and none of the answers above helped solve this problem.

Assuming that the actual domain name you want to use is listed in your c:\windows\System32\drivers\etc\hosts and your configurations in apache\conf\httpd.conf and apache\conf\extra\httpd-vhots.conf right, your problem may be the same as mine:

In the Apache htdocs folder, I had a link related to the actual project that I wanted to see in the browser. Turns out Apache doesn't understand shortcuts . My solution was to create the correct symlink:

In windows and in the httdocs directory httdocs I ran this command in the terminal:

 mklink /d ple <your project directory with index.html> 

This created the corresponding symbolic link in the httpdocs . After restarting the Apache service and then reloading the page, I was able to see my site up.

+1
source

In my case (starting the server locally on windows) I needed to clear the cache after changing the httpd.conf file.

 \modules\apache\bin> ./htcacheclean.exe -t 
0
source

thank you very much this works for me

0
source

Make sure your PHP project is placed inside wamp \ www

First, place the project in the above folder, where a wamp server is installed on your hard drive.

-1
source

Source: https://habr.com/ru/post/953994/


All Articles