standalone nginx, using volumes for extra config and what to serve
875
uses the default nginx configuration, and will include everything in /data/nginx
Exposed
(due to current limitations of trusted builds these are seperate docker repos)
master -> hansd/nginx
php5 -> hansd/nginx-php5
/data: website
/data/nginx: additional configuratioon for nginx/var/log: logging
/var/log/nginx: output of nginx (as per default configuration)80, 443: standard http(s) portssudo docker run -d -p 8000:80 -v /path/to/host/data:/data -v /path/to/host/log:/var/log hansd/nginx-php5
Can be accessed via http://dockerhost:8000
/path/to/host/data/conf/nginx/exampleserver {
listen 80 default_server;
server_name
localhost
example
root /data/www/example;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
# will only work when using hansd/nginx-php5
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
/path/to/host/data/www/example/index.html<html>Hello World!</html>
Content type
Image
Digest
sha256:fd768fa1e…
Size
103.7 MB
Last updated
almost 11 years ago
docker pull hansd/nginx