I use WAMP server for my development on localhost. I was working fine with wamp. Suddenly I am facing a problem that I never saw on localhost. When I am trying to visit http://localhost or http://127.0.0.1 , My browser is showing me an error page with following texts. I got a solution for this problem.
500 Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
How to fix 500 Internal Server Error on LocalHost for WAMP Server
This kind of error is happened if apache mod_rewrite feature of your server is not enabled. By default WAMP server does not load this Apache Mod Rewrite module. It is disabled by default. You have to enable a this option to load this module. There is line in WAMP Apache configuration file about this but that is commented by default. To enable this mod_rewrite feature follow this instruction.
- Look at Wamp icon in notification area on system tray (near Clock in Windows OS)
- Click on the WAMP icon
- Go to Apache>httpd.config
- A Configuration file will be opened in “Note Pad” or your default text editor. Search the text “mod_rewrite” , you will find a line “#LoadModule rewrite_module modules/mod_rewrite.so“
- Uncomment this line by removing the Hash “#” from the beginning of the line.
- Save the file
- Restart WAMP Server by clicking “Restart All Services” from WAMP menu.
- YOU ARE DONE!
Let me know your result by leaving a comment bellow