Enable modrewrite php74

Hello everyone, I wanted to know how to enable the mod_rewrite module on apache that I should use on an APP under /var/www/html configured with php74. Thank you

The rewrite module should be enabled by default, you can test it with httpd -M

[root@testserver2 ~]# httpd -M | grep rewrite
 rewrite_module (shared)

Hi Markuz, yes, the system tells me what you wrote.

Looks good, the rewrite module is already enabled.

Would it be possible to use PHP 8.0 instead of 7.4?

How do I upgrade? From the repo of @stephdl I don’t seem to have seen. I also believe that the problem is not related to the …

From the wiki entry of the php scl module:

This module won’t be updated the official way now is cockpit with the virtualhosts panel

I recommend to use the virtualhosts module instead of /var/www/html because it’s configurable via server manager.

To use PHP8 for /var/www/html you need to install it first:

yum install nethserver-remi-php80-php-fpm

Create the file /etc/httpd/conf.d/www.conf with following content:

# set PHP8
<Directory "/var/www/html">
  <FilesMatch \.php$>
        SetHandler "proxy:fcgi://"

Restart httpd:

systemctl restart httpd

1 Like

Soon I will try again and inform you of the outcome!

Do I need to expand the template or anything else or is it enough to restart only http?

It’s not a template (templates are in /etc/e-smith/templates...) so it’s enough to just restart httpd.