File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,10 @@ RUN a2enmod rewrite ssl
3636# Fixes for running on ARM
3737RUN echo "Mutex posixsem" >> /etc/apache2/apache2.conf
3838
39+ RUN echo "127.0.0.0/8" >> /etc/apache2/trusted-proxies.txt
40+
3941COPY sample_configs/apache.conf /etc/apache2/sites-available/myradio.conf
40- RUN a2dissite 000-default && a2ensite myradio && apachectl -S
42+ RUN a2enmod remoteip && a2dissite 000-default && a2ensite myradio && apachectl -S
4143
4244COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
4345
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ RUN openssl req -nodes -new -subj "/C=GB/ST=North Yorkshire/L=York/O=University
2727RUN a2enmod rewrite ssl
2828
2929COPY sample_configs/apache.conf /etc/apache2/sites-available/myradio.conf
30- RUN a2dissite 000-default && a2ensite myradio && apachectl -S
30+ RUN a2enmod remoteip && a2dissite 000-default && a2ensite myradio && apachectl -S
3131
3232COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
3333
Original file line number Diff line number Diff line change 11# Used to enable local testing. You should of course disable HTTP API access in the real world.
22<VirtualHost *:80>
33 DocumentRoot /var/www
4+
5+ RemoteIPTrustedProxyList /etc/apache2/trusted-proxies.txt
6+ RemoteIPHeader X-Real-IP
7+
48 Alias /api /var/www/myradio/src/PublicAPI
59 <Directory /var/www/myradio/src/PublicAPI>
610 Require all granted
3640 ServerAdmin webmaster@localhost
3741 DocumentRoot /var/www
3842
43+ RemoteIPTrustedProxyList /etc/apache2/trusted-proxies.txt
44+ RemoteIPHeader X-Real-IP
3945
4046 Alias /myradio /var/www/myradio/src/Public
4147 <Directory /var/www/myradio/src/Public>
You can’t perform that action at this time.
0 commit comments