Problem - Webmin + Drupal + htaccess

True, but OP wanted to use htaccess.

If you have the htaccess plugin link for nginx to hand, that might be helpful for the OP.

It might and I don’t because I do not use Drupal and certainly wouldn’t have installed it on Apache) if I ever wanted to install that program I would have sought instructions from them on installation on nginx. (.htaccess being one of the main reason I detest Apache)

of course there is always a trusted search engine for plugins
plugin for nginx (.htaccess)

no guarantee that it works - as with all such things read - understand - test! use at your own risk!

No holy wars, please. Apache vs. nginx is a holy war.

https://forum.virtualmin.com/guidelines

2 Likes

lol

este año noviembre 2024 , instale drupal v11 en virtualmin nginx mariadb php8.3(php-fpm es para nginx), al principio me salio.

  • error 404 Not Found nginx/1.24.0 (Ubuntu)

para que no te salga error tienes que hacer configuracion de nginx en virtualmin
ir a – webmin
------------- servidores
----------------------- servidor web nginx
---------------------------------- editar archivos de configuracion
por default sale /etc/nginx/nginx.conf (es configuracion global de nginx, no tocar ya que cada servidor virtual tiene su archivo a configurar midomain.com.conf es algo asi)
escoje la opcion /etc/sites-available/midomain.com.conf (este archivo es para configurar nginx del servidor virtual creado para tu dominio).
agregas este comando

#agrega todo el primer location
location / {
try_files $uri /index.php?$query_string ;
}
#en este segundo location agrega solo la seccion fastcgi_param y include fastcgi_params solo eso.
location ~ “.php(/|$)” {
try_files $uri $fastcgi_script_name ;
default_type application/x-httpd-php;
fastcgi_pass unix:/run/php/xxxxxxxxxxxxx.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # esta de aqui
include fastcgi_params; #tambien esta de aqui.
}

respeta la estrutura o jerarquia del codigo usando tecla tabulacion.
y por ultimo guardar y cerrar y reinicia servidor nginx

tambien no te olvides de configurar php-fpm memory_size=256 como minimo y
tambien configura tu .htaccess con tu dominio y sus respectivs rutas de archivo segun tu host. ya que .htacess de drupal viene por default y tienes que adecuarlo a tu host ya puedes tener problema cuando instalas modulos de drupal.
cual problema con drupal en virtualmin estare subiendo mi solucion tambien compartan otras alternativas de solucion.
casi me olvido si has instalado php de virtualmin de manera manual desde ssh para tener varias versiones de php tienes configurar php-fpm.conf de tu host drupal 11 en version de php que estas usando y tambien instalar php-composer en version de php a usar para drupal esto es atraves de ssh.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.