Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Some Tricks for apache and The Pro
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-03-12
05:55 AM
2009-03-12
05:55 AM
Some Tricks for apache and The Pro
- How-to activate compression (mod_deflate)
put this code in deflate.conf in /etc/frontview/apache/addons/
LoadModule deflate_module /usr/lib/apache2/modules/mod_deflate.so
DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio
LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
CustomLog /var/log/frontview/deflate_log deflate
<Location />
# Insert filter
SetOutputFilter DEFLATE
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
# Don't compress images
SetEst
vIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \
\.(?:exe|t?gz|zip|gz2|sit|rar)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</Location> - Create a virtual host with authentication
put this code for example in virtual.conf in /etc/frontview/apache/addons/
apache will answer on port 8085
example is extract from my kmotion add-on
Listen 8085
<VirtualHost *:8085>
SSLEngine off
ServerName kmotion
ServerAdmin webmaster@localhost
DocumentRoot /c/webroot/webcam/www_classic
<Directory /c/webroot/webcam/www_classic>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/error_kmotion.log
# Possible values include: debug, info, notice, warn, error, crit,
LogLevel warn
CustomLog /var/log/apache2/access_kmotion.log combined
Alias /camera_select/ /c/webroot/webcam/www_classic/images/camera_select/
Alias /view_select/ /c/webroot/webcam/www_classic/images/view_select/
Alias /misc/ /c/webroot/webcam/www_classic/images/misc/
Alias /function_select/ /c/webroot/webcam/www_classic/images/function_select/
Alias /images/ /c/webroot/webcam/images/
<Location />
AuthName "Restricted"
AuthType Basic
AuthBasicProvider external
AuthExternal pwauth
require user admin
</Location>
#LoadModule authnz_external_module /usr/lib/apache2/modules/mod_authnz_external.so
#LoadModule auth_sys_group_module /usr/lib/apache2/modules/mod_auth_sys_group.so
AddExternalAuth pwauth /usr/bin/pwauth
SetExternalAuthMethod pwauth environment
</VirtualHost> - Reverse Proxy
put this code for example in reverse.conf in /etc/frontview/apache/addons/
apache will answer on port 8089
first virtual host will produce an error 404 because the directory does not exist it's in case the dns name does not exist
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
LoadModule proxy_connect_module /usr/lib/apache2/modules/mod_proxy_connect.so
listen 8089
NameVirtualHost *:8089
<VirtualHost *:8089>
SSLEngine off
ServerName toto.dnsalias.org
ServerAlias toto.dnsalias.org
DocumentRoot /nowhere
<Location />
AuthName "Restricted"
AuthType Basic
AuthBasicProvider external
AuthExternal pwauth
require user admin
</Location>
#LoadModule authnz_external_module /usr/lib/apache2/modules/mod_authnz_external.so
#LoadModule auth_sys_group_module /usr/lib/apache2/modules/mod_auth_sys_group.so
AddExternalAuth pwauth /usr/bin/pwauth
SetExternalAuthMethod pwauth environment
</VirtualHost>
<VirtualHost *:8089>
SSLEngine off
ServerName cam.toto.dnsalias.org
ServerAlias cam.toto.dnsalias.org
ProxyRequests off
ProxyPass / http://192.168.10.214/
ProxyPassReverse / http://192.168.10.214/
<Location />
AuthName "Restricted"
AuthType Basic
AuthBasicProvider external
AuthExternal pwauth
require user admin
</Location>
#LoadModule authnz_external_module /usr/lib/apache2/modules/mod_authnz_external.so
#LoadModule auth_sys_group_module /usr/lib/apache2/modules/mod_auth_sys_group.so
AddExternalAuth pwauth /usr/bin/pwauth
SetExternalAuthMethod pwauth environment
</VirtualHost>
<VirtualHost *:8089>
SSLEngine off
ServerName navigator.toto.dnsalias.org
ServerAlias navigator.toto.dnsalias.org
ProxyRequests off
ProxyPass / http://192.168.10.210/navigator/
ProxyPassReverse / http://192.168.10.210/navigator/
<Location />
AuthName "Restricted"
AuthType Basic
AuthBasicProvider external
AuthExternal pwauth
require user admin
</Location>
#LoadModule authnz_external_module /usr/lib/apache2/modules/mod_authnz_external.so
#LoadModule auth_sys_group_module /usr/lib/apache2/modules/mod_auth_sys_group.so
AddExternalAuth pwauth /usr/bin/pwauth
SetExternalAuthMethod pwauth environment
</VirtualHost>
Message 1 of 4
Labels:
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2010-05-19
02:18 AM
2010-05-19
02:18 AM
Re: Some Tricks for apache and The Pro
Hello,
where i can find the addon Kmotion ?
Tanks
where i can find the addon Kmotion ?
Tanks
Message 2 of 4
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-01-10
02:58 AM
2012-01-10
02:58 AM
Need Help - Reverse Proxy?
Hi, I'm running a few different SERVER Apps on a READY NAS PRO.
I'd appreciate some help with doing the following:
Our ISP DNS will not let us create a domain name (example: Mailserver.trails.com) and point it to (for example) 192.42.4.1:8080
I was told that I'd need to create a reverse proxy lookup inside of Apache which is running on our READY NAS server, have it listen for the actual domain name (mailserver.trails.com) and send it to 192.42.4.1:8080.
Can someone tell me exactly where this file is located, and the actual code needed inside the file to function properly? We don't want to have our team to remember to type http://www.mailserver.trails.com:8080) every time.
Your help is appreciated.
P.S. I'm a non technical person, so your explanations in layman's terms is appreciated.
I'd appreciate some help with doing the following:
Our ISP DNS will not let us create a domain name (example: Mailserver.trails.com) and point it to (for example) 192.42.4.1:8080
I was told that I'd need to create a reverse proxy lookup inside of Apache which is running on our READY NAS server, have it listen for the actual domain name (mailserver.trails.com) and send it to 192.42.4.1:8080.
Can someone tell me exactly where this file is located, and the actual code needed inside the file to function properly? We don't want to have our team to remember to type http://www.mailserver.trails.com:8080) every time.
Your help is appreciated.
P.S. I'm a non technical person, so your explanations in layman's terms is appreciated.
Message 3 of 4
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-03-01
02:42 AM
2013-03-01
02:42 AM
Re: Some Tricks for apache and The Pro
super-poussin wrote:
put this code in deflate.conf in /etc/frontview/apache/addons/
# Don't compress images
SetEst
vIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary
I'm surprised that no one has mentioned this in the four years since it was posted, but there is a typo in that line. It should be:
# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary
Message 4 of 4