I'm having small troubles and was wondering if someone can help bủ over the hump. I pulled a copy of a trang web down from Hostgator and I'm trying to tát phối it up on my local machine using WAMP
but, I keep getting an error when trying to tát access the site. Here is what I have tried..I went to tát Apaches httpd.conf
tệp tin and uncommented the # from LoadModule
rewrite_module modules/mod_rewrite.so. Also I have changed the AllowOverride None to tát All. With that said, Im not sure what else to tát look for. Please note within my application my httaccess
files tự not have a (.)
in front of them (.htaccess)
. I'm not sure if that is worth noting or not. Any ideas as to tát what I need to tát tự to tát access my site? When I access the application I tự see a cached version (white screen), but when I click the liên kết to tát log in I see the 404 Not Found
.
asked Sep 17, 2013 at 14:49
SkillSetSkillSet
6412 gold badges7 silver badges15 bronze badges
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ủ.
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
Bachcha SinghBachcha Singh
3,9243 gold badges26 silver badges39 bronze badges
4
In httpd.conf tệp tin you need to tát 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
Urdesh KumarUrdesh Kumar
1,1401 gold badge17 silver badges23 bronze badges
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
khankhan
1491 silver badge3 bronze badges
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 to tát change in apache2.conf
no need to tát 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
Jignesh JoisarJignesh Joisar
15k5 gold badges67 silver badges60 bronze badges
In wamp/alias/mySite.conf, be careful to tát add a slash "/" at the kết thúc 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
RomainRomain
611 silver badge1 bronze badge
If your .htaccess tệp tin is ok and the problem persist try to tát make the AllowOverride directive enabled in your httpd.conf. If the AllowOverride directive is phối to tát 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 nhâm thìn at 18:50
Badr BellajBadr Bellaj
12.8k3 gold badges45 silver badges47 bronze badges
4
https://create-react-app.dev/docs/deployment/
If you’re using Apache HTTP Server, you need to tát 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 to tát the build thư mục when you run rẩy npm run rẩy build.
answered Mar 6, 2023 at 8:50
Sanket PatilSanket Patil
1,0751 gold badge13 silver badges25 bronze badges
For saving a tệp tin as .htaccess, when using windows, you have to tát 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 to tát receive specific error messages phối Configure::write('debug', 0); to tát '2' in app/config/core.php
for development purposes.
answered Sep 17, 2013 at 16:32
AnugrahAnugrah
1521 silver badge9 bronze badges
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 to tát solve it.
Assuming the actual domain name name you want to tát 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 to tát the actual project I wanted to tát see in the browser. It turns out, Apache doesn't understand shortcuts. My solution was to tát 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 to tát see my trang web up :)
answered Jun 22, 2017 at 23:08
JenniferJennifer
111 silver badge2 bronze badges
For bủ, using OS X Catalina:
Changing from AllowOverride None
to tát 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
FadilsFadils
1,52617 silver badges21 bronze badges
In my case (running the server locally on windows) I needed to tát 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