Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moving mini from Apache to Nginx #255

Open
rjCousineau opened this issue Jul 26, 2022 · 0 comments
Open

moving mini from Apache to Nginx #255

rjCousineau opened this issue Jul 26, 2022 · 0 comments

Comments

@rjCousineau
Copy link

I migrated from Apache to Nginx, and found the provided nginx config example only worked after changing the root from / to /public.

This config worked as well:

server {
        server_name servername.devops.local;
        listen [::]:80;
        listen 80;

        access_log /var/log/nginx/servername.devops.local.log;
        error_log /var/log/nginx/servername.devops.local.log;

        root /var/www/servername/public_html;

        location / {
                index index.php;
                try_files /public/$uri /public/$uri/ /public/index.php?url=$uri;
        }

        location ~ \.php$ {
                fastcgi_pass unix:/run/php-fpm/www.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
        }
}
AlmaLinux 8.6 (Sky Tiger) Linux 4.18.0-372.16.1.el8_6.x86_64
nginx version: nginx/1.14.1
PHP 8.1.8

I'm posting this as an extension to conversation #55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant