Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Internal Server Error using WAMP server

I've created a MVC application using php, but when I try to access the urls it gives me "The server encountered an internal error"

When I check the log it gives me :

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.

my .htaccess file Code:

Options-MultiViews
RewriteEngine On

RewriteBase/MVC/public

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f


RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
like image 381
KuMaR Avatar asked Dec 29 '14 07:12

KuMaR


People also ask

Why my WAMP server is not working?

It says that whatever port is used by Apache (Wamp server) is currently used by some other service, so if you want to start the Apache service then you have to changethe port of this Wampserver service. Now for changing the port you have to go to Wampserver menu => Apache. Open httpd. conf file.

What causes internal server error?

The 500 Internal Server error could be caused by an error during the execution of any policy within Edge or by an error on the target/backend server. The HTTP status code 500 is a generic error response. It means that the server encountered an unexpected condition that prevented it from fulfilling the request.

How do I get 500 internal server error?

Contact the web hosting provider Ultimately, the “500 Internal Server Error” may not be caused by your website configuration. The MySQL server may be down, or the server may be overloaded. Contact your web hosting's support team so they can check the server's status and help further with the problem.


2 Answers

This problem comes due to wampserver using local.

You can change it with:

  • Left click on wampsever

  • Go to APACHE -> APACHE MODULES

  • scroll down and find "rewrite_module"

  • Then mark it check

It will restart automatically. All set.

like image 74
sunil Avatar answered Oct 02 '22 23:10

sunil


To enable mod_rewrite, went through the below steps:

1. Find and open the file .http.conf. This will be located in your Apache install folder.
2. Make a backup of http.conf which you can restore from, if anything were to go wrong
3. Find the line #LoadModule rewrite_module modules/mod_rewrite.so and remove the hash ‘#’
4. Locate the block within the directory tags as indicated below and change to:
<directory />
Options All
AllowOverride All
</directory>
5. Find any additional occurrences of the line “AllowOverride None” and change it to “AllowOverride All”.
6.Finally, restart apache server and your browser. The .htaccess rewriting should now be working for any local website.
like image 21
amit Avatar answered Oct 03 '22 01:10

amit