I'm having small troubles and was wondering if someone can help bầm over the hump. I pulled a copy of a trang web down from Hostgator and I'm trying đồ sộ mix it up on my local machine using WAMP but, I keep getting an error when trying đồ sộ access the site. Here is what I have tried..I went đồ sộ Apaches httpd.conf tệp tin and uncommented the # from LoadModule rewrite_module modules/mod_rewrite.so. Also I have changed the AllowOverride None đồ sộ All. With that said, Im not sure what else đồ sộ look for. Please note within my application my httaccess files vì thế not have a (.) in front of them (.htaccess). I'm not sure if that is worth noting or not. Any ideas as đồ sộ what I need đồ sộ vì thế đồ sộ access my site? When I access the application I vì thế see a cached version (white screen), but when I click the links đồ sộ log in I see the 404 Not Found.

asked Sep 17, 2013 at 14:49

5

In Ubuntu I did not found httpd.conf, It may not exit longer now. Edit in apache2.conf tệp tin working for bầm.

cd /etc/apache2
sudo gedit apache2.conf

Here in apache2.conf change


     Options Indexes FollowSymLinks
     AllowOverride None
     Require all granted

to


        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
  

answered Oct 29, 2018 at 9:56

4

In httpd.conf tệp tin you need đồ sộ remove #

#LoadModule rewrite_module modules/mod_rewrite.so

after removing # line will look lượt thích this:

LoadModule rewrite_module modules/mod_rewrite.so

I am sure your issue will be solved...

Nunser

4,5228 gold badges26 silver badges37 bronze badges

answered Dec 17, 2013 at 14:38

6

change this

Include conf/extra/httpd-vhosts.conf

to

#Include conf/extra/httpd-vhosts.conf

and restart all services

answered Jan 12, năm trước at 16:03

2

i was spend lots of time in this after then i found ...solution

first -
sudo a2enmod rewrite


sudo systemctl restart apache2

this line depends on your apache2 version you found on your console copy and past ...

      sudo nano /etc/apache2/sites-available/000-default.conf


     DocumentRoot "/var/www/html"
    
            Options FollowSymLinks
            AllowOverride All
            Require all granted
    

answered Mar 4, 2021 at 17:35

1

In apache version: 2.4.41

First, enable the apache rewrite module:

sudo a2enmod rewrite

you need đồ sộ change in apache2.conf no need đồ sộ change in sites-available

sudo gedit /etc/apache2/apache2.conf

Original


     Options Indexes FollowSymLinks
     AllowOverride None
     Require all granted

To


    Options Indexes FollowSymLinks
    AllowOverride all
    Require all granted

And restart apache2

sudo service apache2 restart

answered Apr 14, 2022 at 15:33

In wamp/alias/mySite.conf, be careful đồ sộ add a slash "/" at the over of the alias' adress :

Replace :

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

By :

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

Or the index.php is not read correctly.

answered Aug 5, năm trước at 17:33

If your .htaccess tệp tin is ok and the problem persist try đồ sộ make the AllowOverride directive enabled in your httpd.conf. If the AllowOverride directive is mix đồ sộ None in your Apache httpd.config tệp tin, then .htaccess files are completely ignored. Example of enabled AllowOverride directive in httpd.config:

 
    Options FollowSymLinks
    **AllowOverride All**
 

Therefor restart your server.

answered Jul 2, năm 2016 at 18:50

4

https://create-react-app.dev/docs/deployment/

If you’re using Apache HTTP Server, you need đồ sộ create a .htaccess tệp tin in the public thư mục that looks lượt thích this:

Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [QSA,L]

It will get copied đồ sộ the build thư mục when you lập cập npm lập cập build.

answered Mar 6, 2023 at 8:50

For saving a tệp tin as .htaccess, when using windows, you have đồ sộ open notepad and then saveas .htaccess as windows does not create files starting with a dot. That should get your .htaccess working and it'll clear up the issue.

By the way, in order đồ sộ receive specific error messages mix Configure::write('debug', 0); đồ sộ '2' in app/config/core.php for development purposes.

answered Sep 17, 2013 at 16:32

1

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

Assuming the actual tên miền name you want đồ sộ use is specified in your c:\windows\System32\drivers\etc\hosts and your configurations in apache\conf\httpd.conf and apache\conf\extra\httpd-vhots.conf are right, your problem might be the same as mine:

In Apache's htdocs directory I had a shortcut linking đồ sộ the actual project I wanted đồ sộ see in the browser. It turns out, Apache doesn't understand shortcuts. My solution was đồ sộ create a proper symlink:

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

mklink /d ple  

This created a proper symlink in the httpdocs directory. After restarting the Apache service and then reloading the page, I was able đồ sộ see my trang web up :)

answered Jun 22, 2017 at 23:08

For bầm, using OS X Catalina: Changing from AllowOverride None đồ sộ AllowOverride All is the one that works.

httpd.conf is located on /etc/apache2/httpd.conf.

Env: PHP7. MySQL8.

answered Jul 15, 2020 at 9:15

In my case (running the server locally on windows) I needed đồ sộ clean the cache after changing the httpd.conf tệp tin.

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

answered Jul 22, 2017 at 10:53

Make sure your mặc định apache2.conf tệp tin atleast looks lượt thích this: Config tệp tin mặc định location is**/etc/apache2/apache2.conf**


        Options FollowSymLinks
        AllowOverride All
        Require all granted



        AllowOverride None
        Require all granted



        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted