Skip to content

Commit 1077805

Browse files
committed
Changed "www.example.com" to "localhost"
1 parent 2f044b0 commit 1077805

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ Both HTTP and HTTPS are supported and exposed by default.
8686
### Optional environment variables
8787

8888
- `SERVER_ADMIN` (the email, defaults to `you@example.com`)
89-
- `HTTP_SERVER_NAME` (the [server name](https://httpd.apache.org/docs/2.4/fr/mod/core.html#servername), defaults to `www.example.com`)
90-
- `HTTPS_SERVER_NAME` (the [server name](https://httpd.apache.org/docs/2.4/fr/mod/core.html#servername), defaults to `www.example.com`)
89+
- `HTTP_SERVER_NAME` (the [server name](https://httpd.apache.org/docs/2.4/fr/mod/core.html#servername), defaults to `localhost`)
90+
- `HTTPS_SERVER_NAME` (the [server name](https://httpd.apache.org/docs/2.4/fr/mod/core.html#servername), defaults to `localhost`)
9191
- `LOG_LEVEL` (the [log level](https://httpd.apache.org/docs/2.4/fr/mod/core.html#loglevel), defaults to `info`)
9292
- `TZ` (the [timezone](https://www.php.net/manual/timezones.php), defaults to `UTC`)
9393
- `PHP_MEMORY_LIMIT` (the [memory-limit](https://www.php.net/manual/ini.core.php#ini.memory-limit), defaults to `256M`)

docker-entrypoint.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
set -eu
55

66
SERVER_ADMIN="${SERVER_ADMIN:-you@example.com}"
7-
HTTP_SERVER_NAME="${HTTP_SERVER_NAME:-www.example.com}"
8-
HTTPS_SERVER_NAME="${HTTPS_SERVER_NAME:-www.example.com}"
7+
HTTP_SERVER_NAME="${HTTP_SERVER_NAME:-localhost}"
8+
HTTPS_SERVER_NAME="${HTTPS_SERVER_NAME:-localhost}"
99
LOG_LEVEL="${LOG_LEVEL:-info}"
1010
TZ="${TZ:-UTC}"
1111
PHP_MEMORY_LIMIT="${PHP_MEMORY_LIMIT:-256M}"
@@ -15,7 +15,7 @@ echo 'Updating configurations'
1515

1616
# Change Server Admin, Name, Document Root
1717
sed -i "s/ServerAdmin\ you@example.com/ServerAdmin\ ${SERVER_ADMIN}/" /etc/apache2/httpd.conf
18-
sed -i "s/#ServerName\ www.example.com:80/ServerName\ ${HTTP_SERVER_NAME}/" /etc/apache2/httpd.conf
18+
sed -i "s/#ServerName\ localhost:80/ServerName\ ${HTTP_SERVER_NAME}/" /etc/apache2/httpd.conf
1919
sed -i 's#^DocumentRoot ".*#DocumentRoot "/htdocs"#g' /etc/apache2/httpd.conf
2020
sed -i 's#Directory "/var/www/localhost/htdocs"#Directory "/htdocs"#g' /etc/apache2/httpd.conf
2121
sed -i 's#AllowOverride None#AllowOverride All#' /etc/apache2/httpd.conf
@@ -29,7 +29,7 @@ sed -i 's#^ErrorLog .*#ErrorLog "/dev/stderr"#g' /etc/apache2/conf.d/ssl.conf
2929
sed -i 's#^TransferLog .*#TransferLog "/dev/stdout"#g' /etc/apache2/conf.d/ssl.conf
3030
sed -i 's#^DocumentRoot ".*#DocumentRoot "/htdocs"#g' /etc/apache2/conf.d/ssl.conf
3131
sed -i "s/ServerAdmin\ you@example.com/ServerAdmin\ ${SERVER_ADMIN}/" /etc/apache2/conf.d/ssl.conf
32-
sed -i "s/ServerName\ www.example.com:443/ServerName\ ${HTTPS_SERVER_NAME}/" /etc/apache2/conf.d/ssl.conf
32+
sed -i "s/ServerName\ localhost:443/ServerName\ ${HTTPS_SERVER_NAME}/" /etc/apache2/conf.d/ssl.conf
3333

3434
# Re-define LogLevel
3535
sed -i "s#^LogLevel .*#LogLevel ${LOG_LEVEL}#g" /etc/apache2/httpd.conf

0 commit comments

Comments
 (0)