Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix example_site configurations files
  • Loading branch information
ngiger committed Jan 15, 2018
1 parent b11fc2f commit a2b122c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
31 changes: 22 additions & 9 deletions example_site/etc/apache/vhosts.d/ydim.ywesee.com.conf
@@ -1,23 +1,36 @@
NameVirtualHost *:80
NameVirtualHost *:443
<Directory /var/www/ydim.ywesee.com/doc>
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
# SSLRequireSSL
# ErrorDocument 403 https://ydim.ywesee.com/
SSLRequireSSL
ErrorDocument 403 https://ydim.ywesee.com/
</Directory>

<VirtualHost 192.168.0.75:80>
<VirtualHost *:443>
DocumentRoot /var/www/ydim.ywesee.com/doc
ServerName ydim.oddb-ci2.dyndns.org
ServerName ydim.ywesee.com
AddDefaultCharset UTF-8

ErrorLog "|/usr/sbin/cronolog -l /var/www/ydim.ywesee.com/log/error_log /var/www/ydim.ywesee.com/log/%Y/%m/%d/error_log"
CustomLog "|/usr/sbin/cronolog -l /var/www/ydim.ywesee.com/log/access_log /var/www/ydim.ywesee.com/log/%Y/%m/%d/access_log" combined
# SSLEngine on
# SSLCertificateFile /etc/letsencrypt/live/ydim.ywesee.com/cert.pem
# SSLCertificateKeyFile /etc/letsencrypt/live/ydim.ywesee.com/privkey.pem
# SSLCertificateChainFile /etc/letsencrypt/live/ydim.ywesee.com/chain.pem
RewriteEngine on
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/ydim.ywesee.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/ydim.ywesee.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/ydim.ywesee.com/chain.pem
RewriteEngine On
RequestHeader set X-Forwarded-Proto "https"

# rewrite rules for files
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI} -f
RewriteRule ^/(.*)$ %{DOCUMENT_ROOT}/%{REQUEST_URI} [L,NC]
RewriteRule /var/www/oddb.org/doc/resources/errors/appdown.html /var/www/oddb.org/doc/resources/errors/appdown.html [L]
RewriteRule /logo.png /var/www/oddb.org/doc/resources/gcc/logo.png [L]

# Rewrite entries for ydim-html rack service
RewriteMap lc int:tolower
RewriteRule ^/(.*)$ http://localhost:8050/$1 [P]
</VirtualHost>

Expand Down
3 changes: 2 additions & 1 deletion example_site/etc/ydim/ydimd.yml
Expand Up @@ -4,7 +4,8 @@ log_level: DEBUG
mail_from: 'Niklaus Giger (ydim) <user@example.com>'
mail_recipients:
- 'user@example.com'
server_url: druby://localhost:12375
# Using localhost or 127.0.0.1 does not seem to work
server_url: 'druby://192.68.0.1:12375'
smtp_from: 'user@example.com'
email: 'user@example.com'
root_key: '/etc/ydim/id_dsa'
Expand Down
2 changes: 1 addition & 1 deletion example_site/service/ydim/run
@@ -1,5 +1,5 @@
#!/bin/sh
exec 2>&1
ulimit -v 10240000
cd /home/ywesee/git/ydim
cd /var/www/ydim.ywesee.com
exec sudo -u apache /usr/local/bin/bundle-240 exec /usr/local/bin/ruby-240 ./vendor/ruby/2.4.0/bin/ydimd config=/etc/ydim/ydimd.yml

0 comments on commit a2b122c

Please sign in to comment.