Skip to content

Commit

Permalink
move nginx.conf under www/html/
Browse files Browse the repository at this point in the history
  • Loading branch information
alihm committed Feb 20, 2024
1 parent bd23067 commit 10859bf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,4 @@ EXPOSE 2222/tcp

ENTRYPOINT ["/usr/local/docker-entrypoint.sh"]
# Start PHP-FPM and Nginx servers
CMD /usr/local/php-fpm.sh & nginx -g "daemon off;" -c "/var/www/nginx.conf" & /usr/sbin/sshd -D
CMD /usr/local/php-fpm.sh & nginx -g "daemon off;" -c "/var/www/html/nginx.conf" & /usr/sbin/sshd -D
4 changes: 2 additions & 2 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ fi

#copy nginx config
file_path="/etc/nginx/nginx.conf"
dst_path="/var/www/nginx.conf"
dst_path="/var/www/html/nginx.conf"
if [ -f "$dst_path" ]; then
echo "$dst_path already exist."
else
echo "Creating $dst_path..."
cp "$file_path" "/var/www/"
cp "$file_path" "/var/www/html/"
echo "Nginx file copied successfully."
fi

Expand Down
4 changes: 4 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ http {
location = /xmlrpc.php {
deny all;
}
# Block nginx.conf
location = /nginx.conf {
deny all;
}


}
Expand Down

0 comments on commit 10859bf

Please sign in to comment.