Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add example virtualHosts #1

Open
othmar52 opened this issue Nov 10, 2015 · 5 comments
Open

add example virtualHosts #1

othmar52 opened this issue Nov 10, 2015 · 5 comments

Comments

@othmar52
Copy link
Owner

othmar52 commented Nov 10, 2015

for apache, nginx and lighttpd

make sure a special request to status-polling will be excluded from access-log

make sure config/config_local.ini will not get served

make sure all relevant mimeTypes for music-files are correctly set by the server

othmar52 pushed a commit that referenced this issue Jul 19, 2016
othmar52 pushed a commit that referenced this issue Jul 27, 2016
othmar52 pushed a commit that referenced this issue Aug 15, 2016
othmar52 pushed a commit that referenced this issue Aug 15, 2016
@othmar52
Copy link
Owner Author

Apache exclude status-poll-request from log

SetEnvIf Request_URI "/(mpdstatus)|(xwaxstatus)$" dontlog
CustomLog /path/to/your/logs/access_log combined env=!dontlog

Apache 2.4 protect sensitive file from beeing served

<Files  ~ "config_local\.ini$">
  Require all denied
</Files>

Apache 2.2 protect sensitive file from beeing served

<Files  ~ "config_local\.ini$">
  Order deny,allow
  Deny from all
</Files>

@brendan-pike
Copy link

I would appreciate a full vhost example too please.

@othmar52
Copy link
Owner Author

othmar52 commented Apr 7, 2017

@brendan-pike
which webserver do you use?

@brendan-pike
Copy link

Currently on this set-up I use Apache 2.4, I also use Nginx widely and will switch later.

@othmar52
Copy link
Owner Author

othmar52 commented Apr 8, 2017

This works for apache 2.4

<VirtualHost *:80>
        ServerName slim.pd
        DocumentRoot /var/www/slimpd/www
        <Directory /var/www/slimpd/www/>
                AllowOverride All
                Options Indexes FollowSymLinks
                Require all granted
        </Directory>
        <Files  ~ "config_local\.ini$">
                Require all denied
        </Files>
        ErrorLog /var/www/slimpd/logs/error_log

        SetEnvIf Request_URI "/(mpdstatus)|(xwaxstatus)$" dontlog
        CustomLog /var/www/slimpd/logs/access_log combined env=!dontlog
        AddType application/x-httpd-php .php
</VirtualHost>

othmar52 pushed a commit that referenced this issue Mar 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants