Mod_rewrite

Discussion in 'Installation/Configuration' started by John39, Sep 29, 2020.

  1. John39

    John39 New Member

    Hi everyone I need some precious help out here, I just bought a script wich i installed under a vhost domain of ispconfig
    when i go to domain.com/register it gives me error 500
    The programmer of the script says to me i need to enable mod_rewrite
    but it already is enabled.
    This is the htaccess file for the site root directory of that script
    Options All -Indexes
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule ^(.+)$ index.php?altum=$1 [QSA,L]

    I altered the domain .vhost from
    <Directory /var/www/onlinesurvival.club>
    AllowOverride None
    Require all denied
    </Directory>
    to
    <Directory /var/www/onlinesurvival.club>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Require all granted
    </Directory>

    Restarted apache, but still got the same error can someone please help me with this topic thanks a lott
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Never edit vhost files manually when using ISPConfig. Instead, use a .htaccess file or put the lines in the directive snippets under the options tab of the site.

    Undo your manual changes first. Then debug. You could try changing the AllowOverride under the options tab to All (there is a separate field for that)
     
  3. John39

    John39 New Member

    Hi Th0m, thanks for your reply, i did reverse the change to the vhost file and checked, let me share three screenshotes with you please as it still did not solve the error 500 issue. The option you refering to is already set to all.
    Screenshot (51).png Screenshot (50).png Screenshot (52).png
     
  4. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Error 500 is an internal server error, eg. script error, missing files, etc.; check the error.log to see what the error is.
     
  5. John39

    John39 New Member

    109.27.95.121 - - [29/Sep/2020:19:30:19 +0200] "POST /register HTTP/1.1" 500 4683 "onlinesurvival club/register" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36"

    i had to alter the link to post the error here
     
  6. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    That is an access.log message, you need error.log.
     
  7. John39

    John39 New Member

    My errorlog is empty, however if i do a mod_rewrite search on the internet browser it says the module is not found, when i do a2enable mod_rewrite it says it is active already
    so my phpinfo shows that the mod isnt active how does that come
     
  8. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Perhaps you have error logging disabled in php.ini or in the website's own config. What does phpinfo() show when run from this site?

    That could happen if you enabled the module but have not restarted apache yet. I suppose that's possible, but mod_rewrite is used by ispconfig in many places and things won't work right without it; I suspect you would have noticed issues without it.
     
  9. John39

    John39 New Member

    Ok i restarted the apache several times and just decided to reinstall completely my VPS, wich now is managed technacly by my provider, i gonna reinstall that script, but as from default mod_rewrite is enabled on a ispconfig clean install right
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    mod_rewrite is active by default when you followed the ISPConfig installation instructions (perfect server guide).

    I doubt that current php modes like php-fpm can show you that info at all, so it's fine that it does not show up there and it#s no indication that it is not active.
     
  11. John39

    John39 New Member

    Hi everyone thank you all for your reply's I dont know the final solution, but I logged in to my VPS service provider reinstalled the vps installed the script and it was working out of the box. thanks for your help and quick reply's for everyone I close this topic.
     

Share This Page