2

I am trying to host my wordpress project in centos remotely, i have hosted it on /var/www/html and gave permission 777 for all sub folders and files, and changes and in .httpd file i have changed to all

<Directory />
    AllowOverride All
#   Require all denied
</Directory>

and

<Directory "/var/www">
    AllowOverride All
   #  Allow open access:
   #  Require all granted
</Directory>

also in

<Directory "/var/www/html"> 
AllowOverride All
</Directory>

have changed

<Directory "/var/www/cgi-bin">
    AllowOverride All
    Options None
    Require all granted
</Directory>

but not use the i am getting same internal server error, and The requested URL /l was not found on this server, but i can able to access backend of wordpress wp-admin what would be the problem then?

  • Is it an internal server error (500) or a Page not found (404) error you're getting? Do you have the apache module `mod_rewrite` enabled? Do you have added any `.htaccess` file? – M. Eriksson Nov 24 '17 at 11:58
  • i am getting internal server error 500 – Pattatharasu Nataraj Nov 24 '17 at 12:02
  • have added mod_rewrite – Pattatharasu Nataraj Nov 24 '17 at 12:02
  • LoadModule rewrite_module modules/mod_rewrite.so – Pattatharasu Nataraj Nov 24 '17 at 12:02
  • A 500 error is most likely an error in your PHP-code/missing libraries etc. To see the _actual_ error message, check your servers error log. You can also change how PHP displays errors and tell it to show all errors directly on the screen (this is not something you want in production though, since it can show sensitive data, but during development, you should). Here's how to show all errors and warnings: https://stackoverflow.com/questions/5438060/showing-all-errors-and-warnings – M. Eriksson Nov 24 '17 at 12:04

2 Answers2

3

Adding this in .htaccess solved the problem

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
-1

I think the best way is check apache error log.

tuannm
  • 19
  • 3