DEV mode ergonomics: display_errors, Xdebug, posix, HTTP redirect keeps the port
All DEV only (environment=DEV); production containers never read any of it and render identical config. - /etc/php.d/99-dev.ini: display_errors=On, opcache.revalidate_freq=0 (error_reporting stays at the prod value: E_DEPRECATED floods wp-cli and PHP 8.5 startup) - XDEBUG=1 installs php-pecl-xdebug3 from the same Remi module stream as the image's PHP and writes 98-xdebug-dev.ini (XDEBUG_MODE, XDEBUG_START, XDEBUG_CLIENT_HOST default host.docker.internal, XDEBUG_CLIENT_PORT default 9003; values validated); failure to install is a DEV failure (non-zero exit) - php-process (posix) installed best effort - create-vhost.sh: with PUBLIC_HTTPS_PORT set (DEV, not 443) the HTTP->HTTPS rewrite keeps the port - README: DEV mode and Xdebug client settings sections Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
This commit is contained in:
1 parent
e540110a46
commit
2fe13fdab0
5 files changed
+114
-1
No files matched your search
+18
-1
@@ -2,6 +2,23 @@
|
||||
|
||||
alias_block=''
|
||||
|
||||
# ---- HTTP -> HTTPS redirect keeps a non-standard HTTPS port (DEV only, set by
|
||||
# local-dev.sh from -s). Without it a `-s 8443` mapping is redirected to
|
||||
# https://host/ (port 443) and breaks. Unset, non-DEV or 443 = unchanged bytes.
|
||||
https_port_part=''
|
||||
if [ "${environment:-}" = "DEV" ] && [[ "${PUBLIC_HTTPS_PORT:-}" =~ ^[0-9]{1,5}$ ]] && [ "$PUBLIC_HTTPS_PORT" != "443" ]; then
|
||||
https_port_part=":$PUBLIC_HTTPS_PORT"
|
||||
fi
|
||||
|
||||
#Create Server Alias Block
|
||||
if [ ! -z $serveralias ]; then
|
||||
for alias in $(echo $serveralias | tr ',' ' ')
|
||||
do
|
||||
alias_block=$alias_block"ServerAlias $alias
|
||||
"
|
||||
done
|
||||
fi
|
||||
|
||||
cat <<EOF > /etc/httpd/conf.d/$domain.conf
|
||||
|
||||
<Directory "/home/$user">
|
||||
@@ -22,7 +39,7 @@ cat <<EOF > /etc/httpd/conf.d/$domain.conf
|
||||
DocumentRoot "/home/$user/public_html"
|
||||
RewriteEngine on
|
||||
RewriteCond %{SERVER_NAME} =$domain
|
||||
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
|
||||
RewriteRule ^ https://%{SERVER_NAME}${https_port_part}%{REQUEST_URI} [END,NE,R=permanent]
|
||||
</VirtualHost>
|
||||
|
||||
Listen 443 https
|
||||
|
||||
Reference in new issue
Block a user