Skip to content

Commit 3d79c99

Browse files
committed
ajust spacing for startupservice.sh and put apache2 config file back
1 parent 082f62c commit 3d79c99

File tree

3 files changed

+76
-1
lines changed

3 files changed

+76
-1
lines changed

ansible/etc-ansible-config/ansible.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[defaults]
22
inventory = /etc/ansible/hosts
33
remote_user = sysadmin
4-
host_key_checking = False
4+
host_key_checking = True
55
retry_files_enabled = False
66
private_key_file = /home/sysadmin/.ssh/id_rsa
77

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
ServerName localhost:8080
2+
3+
<VirtualHost *:80>
4+
ErrorLog ${APACHE_LOG_DIR}/error.log
5+
CustomLog ${APACHE_LOG_DIR}/access.log combined
6+
7+
RewriteEngine On
8+
9+
###########################################################################
10+
# Ensure plaintext files are served using UTF-8
11+
AddCharset utf-8 .txt
12+
# Set conservative/secure defaults
13+
<Directory />
14+
AllowOverride None
15+
DirectoryIndex index.html
16+
Options -Indexes
17+
</Directory>
18+
# Git
19+
<DirectoryMatch "/\.git">
20+
Require all denied
21+
</DirectoryMatch>
22+
# Subversion
23+
<DirectoryMatch "/\.svn">
24+
Require all denied
25+
</DirectoryMatch>
26+
# Deny access to accidental uploads of macOS-specific directories and files
27+
# .DS_Store
28+
<FilesMatch "^(\._)?\.[Dd][Ss]_[Ss]tore">
29+
Require all denied
30+
</FilesMatch>
31+
# resource forks
32+
<DirectoryMatch "/__MACOSX">
33+
Require all denied
34+
</DirectoryMatch>
35+
36+
###########################################################################
37+
# WordPress/Default
38+
DocumentRoot /var/www/dev
39+
<Directory /var/www/dev>
40+
# Expected configuration for WordPress
41+
# (see conf-available/docker-php.conf)
42+
AllowOverride All
43+
DirectoryIndex index.php index.html
44+
45+
# WP-API
46+
RewriteRule ^(/wp-json/.*)$ /index.php$1 [L]
47+
48+
# Legacy theme (hotlinked image that gives CC exposure)
49+
RedirectPermanent /wp-content/themes/cc/images/cc.logo.white.svg https://ccstatic.org/cc2016www/images/cc.logo.white.svg
50+
51+
# Permalinks (for dirs/files not found)
52+
# https://codex.wordpress.org/Using_Permalinks
53+
# Directory Conditions
54+
RewriteCond %{REQUEST_FILENAME} !-d
55+
RewriteCond %{REQUEST_URI} !^/rdf
56+
RewriteCond %{REQUEST_URI} !^/publicdomain
57+
RewriteCond %{REQUEST_URI} !^/platform/toolkit
58+
RewriteCond %{REQUEST_URI} !^/licen[cs]es
59+
RewriteCond %{REQUEST_URI} !^/faq
60+
RewriteCond %{REQUEST_URI} !^/choose
61+
RewriteCond %{REQUEST_URI} !^/cc-legal-tools
62+
# File Conditions
63+
RewriteCond %{REQUEST_FILENAME} !-f
64+
RewriteCond %{REQUEST_URI} !^/schema.rdf$
65+
RewriteCond %{REQUEST_URI} !^/ns.html$
66+
RewriteCond %{REQUEST_URI} !^/ns$
67+
# Rule
68+
RewriteRule . /index.php [L]
69+
70+
</Directory>
71+
72+
</VirtualHost>
73+
74+
# vim: ft=apache ts=4 sw=4 sts=4 sr et

web/config-web/startupservice.sh

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ E1="$(printf "\e[1m")" # bold
88

99
/sbin/apache2ctl -v
1010
echo "${E1}Starting webserver: http://127.0.0.1:8080${E0}"
11+
1112
# Start Apache in the background
1213
/sbin/apache2ctl -k start
1314

0 commit comments

Comments
 (0)