mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
fix docker http2 config
This commit is contained in:
@@ -62,9 +62,11 @@ envsubst '$PHPMYADMIN_SERVER_NAME' < /etc/nginx/conf.d/sites/phpmyadmin.conf.tem
|
|||||||
if [ "$USE_HTTPS" = "0" ]; then
|
if [ "$USE_HTTPS" = "0" ]; then
|
||||||
echo_info "remove https related configuration ..."
|
echo_info "remove https related configuration ..."
|
||||||
sed -i '/ssl_certificate/d' "$APP_CONF"
|
sed -i '/ssl_certificate/d' "$APP_CONF"
|
||||||
|
sed -i '/http2/d' "$APP_CONF"
|
||||||
sed -i 's/listen.*/listen 80;/g' "$APP_CONF"
|
sed -i 's/listen.*/listen 80;/g' "$APP_CONF"
|
||||||
|
|
||||||
sed -i '/ssl_certificate/d' "$PMA_CONF"
|
sed -i '/ssl_certificate/d' "$PMA_CONF"
|
||||||
|
sed -i '/http2/d' "$PMA_CONF"
|
||||||
sed -i 's/listen.*/listen 80;/g' "$PMA_CONF"
|
sed -i 's/listen.*/listen 80;/g' "$PMA_CONF"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
server {
|
server {
|
||||||
listen 443 ssl http2;
|
listen 443 ssl;
|
||||||
|
http2 on;
|
||||||
server_name ${NP_DOMAIN};
|
server_name ${NP_DOMAIN};
|
||||||
|
|
||||||
root /var/www/html/public;
|
root /var/www/html/public;
|
||||||
index index.php index.html;
|
index index.php index.html;
|
||||||
|
|
||||||
ssl_certificate /certs/fullchain.pem;
|
ssl_certificate /certs/fullchain.pem;
|
||||||
ssl_certificate_key /certs/privkey.pem;
|
ssl_certificate_key /certs/private.pem;
|
||||||
|
|
||||||
location = /favicon.ico {
|
location = /favicon.ico {
|
||||||
log_not_found off;
|
log_not_found off;
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
server {
|
server {
|
||||||
listen 443 ssl http2;
|
listen 443 ssl;
|
||||||
|
http2 on;
|
||||||
server_name ${PHPMYADMIN_SERVER_NAME};
|
server_name ${PHPMYADMIN_SERVER_NAME};
|
||||||
|
|
||||||
ssl_certificate /certs/fullchain.pem;
|
ssl_certificate /certs/fullchain.pem;
|
||||||
ssl_certificate_key /certs/privkey.pem;
|
ssl_certificate_key /certs/private.pem;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://phpmyadmin:80;
|
proxy_pass http://phpmyadmin:80;
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ TARGET_DIR="${ROOT_PATH}/public"
|
|||||||
ENV_FILE="${ROOT_PATH}/.env"
|
ENV_FILE="${ROOT_PATH}/.env"
|
||||||
VENDOR_DIR="${ROOT_PATH}/vendor"
|
VENDOR_DIR="${ROOT_PATH}/vendor"
|
||||||
|
|
||||||
|
chown -R www-data:www-data $ROOT_PATH
|
||||||
|
|
||||||
if [ "$SERVICE_NAME" = "php" ]; then
|
if [ "$SERVICE_NAME" = "php" ]; then
|
||||||
if [ ! -f "$ENV_FILE" ]; then
|
if [ ! -f "$ENV_FILE" ]; then
|
||||||
echo_info ".env file: $ENV_FILE not exists, copy $SOURCE_DIR to $TARGET_DIR ..."
|
echo_info ".env file: $ENV_FILE not exists, copy $SOURCE_DIR to $TARGET_DIR ..."
|
||||||
|
|||||||
+1
-1
@@ -62,7 +62,7 @@ services:
|
|||||||
context: ./.docker/openresty
|
context: ./.docker/openresty
|
||||||
container_name: nexusphp-openresty
|
container_name: nexusphp-openresty
|
||||||
environment:
|
environment:
|
||||||
DOMAIN: ${NP_DOMAIN}
|
NP_DOMAIN: ${NP_DOMAIN:-localhost}
|
||||||
volumes:
|
volumes:
|
||||||
- ./.docker/openresty/sites:/etc/nginx/conf.d/sites
|
- ./.docker/openresty/sites:/etc/nginx/conf.d/sites
|
||||||
- ./.docker/openresty/certs:/certs
|
- ./.docker/openresty/certs:/certs
|
||||||
|
|||||||
Reference in New Issue
Block a user