[Mapbender-users] MB 2.7.x: Can't save wms application settings

lukas.bollack lukas.bollack at naturnetz.ch
Tue Mar 1 02:02:36 PST 2016

Ok so now my proxy.conf looks like this:

<IfModule mod_proxy.c>

# If you want to use apache2 as a forward proxy, uncomment the
# 'ProxyRequests On' line and the <Proxy *> block below.
# WARNING: Be careful to restrict access inside the <Proxy *> block.
# Open proxy servers are dangerous both to your network and to the
# Internet at large.
# If you only want to use apache2 as a reverse proxy/gateway in
# front of some web application server, you DON'T need
# 'ProxyRequests On'.

ProxyRequests Off
<Proxy *>
        AddDefaultCharset off
        Order deny,allow
        Deny from all
        Allow from localhost

# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via:
# Set to one of: Off | On | Full | Block
#ProxyVia Off


my httpd.conf is empty

my /etc/apache2/sites-available/default looks like this:

<VirtualHost *:80>
	ServerAdmin webmaster at localhost

	DocumentRoot /var/www
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	<Directory /var/www/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all

	ErrorLog ${APACHE_LOG_DIR}/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from ::1/128

    Alias /owsproxy /var/www/naturnetz.com/mapbender/owsproxy
    <Directory /var/www/naturnetz.com/mapbender/owsproxy/>
         Options +FollowSymLinks
         ReWriteEngine On
         RewriteBase /owsproxy
         RewriteRule  ^([\w\d]+)\/([\w\d]+)\/?$$1\&wms=$2\& [P,L,QSA,NE]
         Options +Indexes
         Allow from all

    Alias /cors_proxy /var/www/naturnetz.com/mapbender/cors_proxy
    <Directory /var/www/naturnetz.com/mapbender/cors_proxy/>
          Options +FollowSymLinks
          ReWriteEngine On
          RewriteBase /cors_proxy
          RewriteRule  ^([\d]+)?$$1\& [P,L,QSA,NE]
          Options +Indexes
          Allow from all

    Alias /http_auth /var/www/naturnetz.com/mapbender/http_auth
    <Directory /var/www/naturnetz.com/mapbender/http_auth/>
          Options +FollowSymLinks +Indexes
          ReWriteEngine On
          RewriteBase /http_auth
          RewriteRule  ^([\d]+)\/?$$1 [P,L,QSA,NE]
          Order allow,deny
          Allow from all


My Mapbender.conf looks like this (just the parts we discussed):

# --------------------------------------------
# URL to owsproxy
# (no terminating slash)
# OWSPROXY_USE_LOCALHOST - use and http for the requests if
# --------------------------------------------
define("OWSPROXY", "http://".$_SERVER['HTTP_HOST']."/owsproxy");
define("OWSPROXY_USE_LOCALHOST", false);

# --------------------------------------------
# Definitions for HTTP Authentication
# --------------------------------------------
define('REALM', 'mapbender_registry');
define('NONCEKEY', 'mapbender');
$nonceLife = 300; 
//Problem - behind a rewrite rule - define it hardcoded?

# --------------------------------------------
# type of server-connection
# curl, socket, http
# --------------------------------------------

define("CONNECTION", "curl");
#define("CONNECTION", "http");
#define("CONNECTION", "socket");

define("CONNECTION_PROXY", ""); // ip
define("CONNECTION_PORT", ""); // port
define("CONNECTION_USER", "<user>"); // user
define("CONNECTION_PASSWORD", "<password>"); // password
define("CONNECTION_USERAGENT", "Mapbender");

Now when I put naturnetz.com/owsproxy into my browsers address bar, it says
"The requested URL /owsproxy was not found on this server." Shouldn't it
lead to the /var/www/naturnetz.com/mapbender/owsproxy folder?

Also, I have a wms-layer which is password protected in my mapbender
installation. I registered it once in this form:
http://user:password@url/wms?GetCapabilities&SERVICE=WMS&VERSION=1.1.0 and
once in this form: http://url/wms?GetCapabilities&SERVICE=WMS&VERSION=1.1.0.
Both times I also saved username and password in the field below and chose
"basic" as authentification method. In my GUI i added both wms variants. I
also added the owsproxy module to the gui. Now when I display the gui, the
wms variant where I entered username and password directly in the request
URL is displayed, but Mapbender still creates a popup asking me for the
credentials. When I enter the correct credentials, the layer is displayed no
problems. The other layer is never displayed and I am not asked for
Now when I click the getURL button in the GUI I get a URL like this:
When I enter this URL in the browser it says: "The requested URL
/owsproxy/ks3p3ae2a3svhf3n7ugqj9sf06/45bcd5bfc8bc7f7ba12cb40981304185 was
not found on this server."

Where could the error be? Did I miss anything?

View this message in context: http://osgeo-org.1560.x6.nabble.com/MB-2-7-x-Can-t-save-wms-application-settings-tp5244512p5253561.html
Sent from the mapbender-users mailing list archive at Nabble.com.

More information about the Mapbender_users mailing list