This commit is contained in:
小王 2024-09-12 22:53:36 +08:00
parent 9cbfe2e336
commit 8527bdeb8a
2 changed files with 28 additions and 1 deletions

View File

@ -9,10 +9,16 @@ VOLUME /var/www/html
ENV NACOS_ADDR="192.168.1.105:8848" \
SERVER_ADDR="192.168.1.161:80"
COPY . /var/www/html
ADD run.sh /run.sh
ADD default.conf /etc/nginx/http.d/default.conf
RUN chmod +x /run.sh
COPY . /var/www/html
WORKDIR /var/www/html
RUN chown www-data:www-data -R /var/www/html
EXPOSE 80
ENTRYPOINT ["/run.sh"]

21
defaulf.conf Normal file
View File

@ -0,0 +1,21 @@
# This is a default site configuration which will simply return 404, preventing
# chance access to any other virtualhost.
server {
listen 80;
server_name localhost;
root /var/www/html/public;
index index.html index.htm index.nginx-debian.html;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}