I installed last night wamp on my win 7 laptop and started creating a small framework for my projects,
But when I firstly added the RewriteEngine on,it just wasn't working. So I checked to see if the module was on, After I edited the conf file and restarted the server and also checked on apache mods under wamp menu, i confirmed that it was on. So i try to check the page again and I still get an internal server error. So i check the conf file again to check directories permission settup and it seems fine.
So then I go go the error logs and I find Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration. I checked if the .so file actually exist. I dont know what else to try, please help me before i go nuts.
<Directory >
AllowOverride none
Require all denied
</Directory>
<Directory "c:/wamp/www/">
AllowOverride All
Allow From All
Require all granted
</Directory>
#LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule rewrite_module modules/mod_rewrite.so
Since it didn't make sense to me why the RewriteEngine wasn't working (code wise). I suspect there was something wrong with my Wamp installation (it would work in the background even after I close it) even though it was a fresh installation. So I decided to re-install the Wamp server, change the Apache conf file and everything is working fine now.
Related
I'd like to run CakePHP on WAMP but without having to run bin\cake server or use the default port :8765 but I am struggling to figure out how.
I tried changing apache httpd.conf to
DocumentRoot "c:/wamp/www/dev/cakephp3/tradeshows/webroot"
Which is what I took away from http://book.cakephp.org/3.0/en/installation.html#production
But it doesn't work still.
http://localhost does show the CakePHP landing page, but when I try going to http://localhost/events I'm getting:
Not Found
The requested URL /events was not found on this server.
If I go to http://localhost:8765/events and do bin\cake server then it works perfectly.
How can I make it so that I don't have to run bin\cake server to work correctly? I'm just trying to make a simple database for me and my coworker to use on our computers to put in tradeshow information.
Following the tutorial here I was able to get it working, first time I tried I was editing the wrong config file:
Open C:\wamp\bin\apache\apache2.4.9\httpd.conf
Edit the part <Directory /> to read:
<Directory />
Options FollowSymLinks
AllowOverride All
# Order deny,allow
# Deny from all
</Directory>
Then also had to uncomment the line:
LoadModule rewrite_module modules/mod_rewrite.so
Which is different slightly than what's in the link but still did the job.
I copied the relevant lines over from another installation but it doesn't work here. I get a 404 generated by the word press that's installed on the server.
<Location /server-status>
SetHandler server-status
Order Allow,Deny
Allow from [my ip]
</Location>
I used to visit http://[old server ip]/server-status and it worked fine. Now I just get a 404 coming out of the wordpress that's installed on the new server.
Is this what happens if the proper mods are not installed in this installation? How can I tell? How can I trouble shoot this? Thanks.
You're probably missing the LoadModule for mod_status. On debian/ubuntu, use a2enmod. If you manage your config directly, just add the LoadModule for mod_status.
The problem was that this config had to go in /etc/apache2/mods-enabled/status.conf
From what I read it seemed to me like it could also go in apache2.conf or the individual site config file but those didn't work for me for some reason.
I have enabled mod_rewrite (it's checked in the WAMP icon in my taskbar and uncommented in httpd.conf) and I've made sure any AllowOverride settings in httpd.conf are set to All, yet I'm still getting a 500 error message and
[alert] [client 127.0.0.1] E:/mywebsite/html/.htaccess: AllowOverride not allowed here
in my Apache error log.
Could it be a result of changing the DocumentRoot to a completely different one? I installed WAMP on D:\ and changed the root to my Dropbox folder on E:\.
Is there an extra conf file WAMP has that sets special settings like XAMPP does?
Why am I still getting this error? I've searched the internet high and low for an answer, yet they all tell me to enable that module and I have done.
On Windows 7, WAMP 2.2.
Just moving my comment as answer since it seems to have resolved OP's problem.
Looking at error it seems there is a AllowOverride line in E:/mywebsite/html/.htaccess and Apache is throwing 500 error because AllowOverride isn't allowed in .htaccess.
I am trying to learn web python programming and because of that i tried to install python in wamp server using the procedure given in this tutorial. I have gone through the steps as mentioned in tutorial.But When i tried to run the python script it is showing this error in firefox
Unable to connect
Firefox can't establish a connection to the server at localhost.
i have found out that addition of these two scripts in apache/httpd.conf some how affects the whole wamp server
1)LoadModule wsgi_module modules/mod_wsgi.so
and
2) <Directory “C:/wamp/www/python”>
Options ExecCGI
AddHandler wsgi-script .py
Order allow,deny
Allow from all
</Directory>
When i enabled above code in all combinations (1,2 and both) and restarted;the server showed offline (yellow 'W' sign) but when i removed or disabled (using #) both scripts it showed green 'W' sign of wamp and it is working.
anyone have any idea why its showing this error and how i can i run python files in wamp?
my system configration
windows 7 32 bit
python 3.2
[mod_wsgi][2] for python 3.1
WampServer Version 2.1
Looks like you have a couple of problems here, since WAMP won't start with wsgi_module enabled. Let's start with the second problem, which is a duplicate of this question. Basically, the tutorial you are following seems to have a typo and some bad quotes. Change your virtual host configuration to say:
<Directory "C:/wamp/www/python">
Options ExecCGI
AddHandler wsgi-script.py
Order allow,deny
Allow from all
</Directory>
(Notice the straight quotes around your directory name and the space I removed from the AddHandler line)
Once you have fixed this, is your WAMP still staying yellow when you include the LoadModule wsgi_module modules/mod_wsgi.so line?
Is there some apache server software out there that can be installed on my Windows PC (for local development purposes) that also allows .htaccess for URL rewriting?
I'm currently using Xampp which does not seem to offer this functionality (although maybe I'm wrong about that).
Any advice would be much appreciated.
Thanks.
You will have to activate mod_rewrite in your apache config. Go to your xampp folder an you will find the httpd.conf file in apache/conf/. Open it an go to the line with:
#LoadModule rewrite_module modules/mod_rewrite.so
Change it to
LoadModule rewrite_module modules/mod_rewrite.so
Save the httpd.conf and restart your apache. Now mod_rewrite should work.
Xampp will do it, you'll need to enable mod_rewrite first.
open the directory you installed Xampp then open \apache\conf\httpd.conf in notepad and search for mod_rewrite.
Uncomment the line by removing the # from the beginning. By default mod_rewrite is disabled on a fresh install.
LoadModule rewrite_module modules/mod_rewrite.so
Restart Xamppp should take .htaccess rules now.
It's true that by default, Xampp on windows does not support URL rewriting.
However it's an pretty easy fix:
In your httpd.conf file, find the line that contains "mod_rewrite" and remove the # in front of it
Again in your httpd.conf file, find all occurrences of AllowOverride None and change it to AllowOverride All
Restart apache and you're done:)