COPY ./default.conf /etc/nginx/conf.d/default.conf
# Set DOCUMENT_ROOT
-RUN test "$WWW_ROOT" && sed -ie 's,^\([\t ]*root \).*$,\1'$WWW_ROOT';,' /etc/nginx/conf.d/default.conf
+RUN test "$WWW_ROOT" && sed -i -e 's,^\([\t ]*root \).*$,\1'$WWW_ROOT';,' /etc/nginx/conf.d/default.conf
# Set PHP_HOST
-RUN test "$PHP_HOST" && sed -ie 's,^\([\t ]*fastcgi_pass \)\([^:]\+\)\(:.*\)$,\1'$PHP_HOST'\3,' /etc/nginx/conf.d/default.conf
+RUN test "$PHP_HOST" && sed -i -e 's,^\([\t ]*fastcgi_pass \)\([^:]\+\)\(:.*\)$,\1'$PHP_HOST'\3,' /etc/nginx/conf.d/default.conf
# Set PHP_PORT
-RUN test "$PHP_PORT" && sed -ie 's,^\([\t ]*fastcgi_pass [^:]\+:\)\([0-9]\+\),\1'$PHP_PORT',' /etc/nginx/conf.d/default.conf
+RUN test "$PHP_PORT" && sed -i -e 's,^\([\t ]*fastcgi_pass [^:]\+:\)\([0-9]\+\),\1'$PHP_PORT',' /etc/nginx/conf.d/default.conf
# Create default index.html
RUN mkdir -p $WWW_ROOT && echo '<html><head><title>Welcom to Nginx Php Fpm</title></head><body><h1>Welcom to Nginx Php Fpm</h1></body></html>' > $WWW_ROOT/index.html
server {
- listen 80 default_server;
+ listen 1973 default_server;
+ server_name dbq dbq.*
root /var/www/html;
index index.html index.php;
###############################################################
# serve static files directly
- location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico)$ {
- access_log off;
- expires 30d;
- }
+ #location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico)$ {
+ # access_log off;
+ # expires 30d;
+ #}
###############################################################
# FastCGI
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_pass php:9000;
+ fastcgi_pass localhost:9000;
+ fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;