-
Notifications
You must be signed in to change notification settings - Fork 108
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
PHP Support #17
Comments
I'm not familiar with how to run PHP in nginx. Can anyone else help?
…On Thu, Feb 9, 2017, 3:04 PM Dmytro ***@***.***> wrote:
Hi,
Is it possible at the moment to serve PHP site with this image?
I have NGINX config like this:
server {
listen 8006;
server_name _;
root /location/;
index index.php index.html index.htm default.html default.htm;
client_max_body_size 100M;
location / {
try_files $uri $uri/ /index.php?$args;
}
# deny running scripts inside writable directories
location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
return 403;
error_page 403 /403_error.html;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
# caching of files
location ~* \.(ico|pdf|flv)$ {
expires 1y;
}
location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
expires 14d;
}
}
When I run the container, it does not seem to work. Does not even print
logs.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#17>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AAEVh0J8K-H8XwKBWruo5zmahC05Hqnpks5ra5tigaJpZM4L8yFq>
.
|
PHP-FPM (ideally of version 7) is needed. I was inspired by your work and created my own NGINX container (for my quite specific needs). Take a look if you'd like. I am leaving the issue open in case you would like to add PHP support some day. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Is it possible at the moment to serve PHP site with this image?
I have NGINX config like this:
When I run the container, it does not seem to work. Does not even print logs.
The text was updated successfully, but these errors were encountered: