slimpd icon indicating copy to clipboard operation
slimpd copied to clipboard

add example virtualHosts

Open othmar52 opened this issue 10 years ago • 5 comments

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 avatar Nov 10 '15 19:11 othmar52

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>

othmar52 avatar Sep 11 '16 07:09 othmar52

I would appreciate a full vhost example too please.

brendan-pike avatar Apr 07 '17 16:04 brendan-pike

@brendan-pike which webserver do you use?

othmar52 avatar Apr 07 '17 16:04 othmar52

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

brendan-pike avatar Apr 08 '17 03:04 brendan-pike

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 avatar Apr 08 '17 07:04 othmar52