Skip to content

Commit

Permalink
Inline Apache configuration into the application install scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
igorpeshansky committed Jul 26, 2024
1 parent 1bca17d commit f756dab
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
set -e

sudo yum -y install httpd
(cd /etc/httpd/conf.d/ && sudo curl -O https://raw.githubusercontent.com/Stackdriver/stackdriver-agent-service-configs/master/etc/httpd/conf.d/status.conf)
sudo mkdir -p /etc/httpd/conf.d/
sudo tee /etc/httpd/conf.d/status.conf >/dev/null <<EOF
ExtendedStatus on
<VirtualHost 127.0.0.1:80>
ServerName local-stackdriver-agent.stackdriver.com
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
</VirtualHost>
EOF

sudo service httpd start
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@ set -e

sudo apt update
sudo apt install -y apache2
(cd /etc/apache2/conf-available/ && sudo curl -O https://raw.githubusercontent.com/Stackdriver/stackdriver-agent-service-configs/master/etc/httpd/conf.d/status.conf)
sudo mkdir -p /etc/httpd/conf.d/
sudo tee /etc/httpd/conf.d/status.conf >/dev/null <<EOF
ExtendedStatus on
<VirtualHost 127.0.0.1:80>
ServerName local-stackdriver-agent.stackdriver.com
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
</VirtualHost>
EOF

sudo service apache2 start
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,19 @@ sudo zypper -n refresh

sudo zypper -n install apache2

(cd /etc/apache2/conf.d/ && sudo curl -O https://raw.githubusercontent.com/Stackdriver/stackdriver-agent-service-configs/master/etc/httpd/conf.d/status.conf)
sudo mkdir -p /etc/httpd/conf.d/
sudo tee /etc/httpd/conf.d/status.conf >/dev/null <<EOF
ExtendedStatus on
<VirtualHost 127.0.0.1:80>
ServerName local-stackdriver-agent.stackdriver.com
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
</VirtualHost>
EOF
sudo a2enmod mod_status
sudo a2enmod mod_access_compat

Expand Down

0 comments on commit f756dab

Please sign in to comment.