MB 2.7.x: Can't save wms application settings

classic Classic list List threaded Threaded
45 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

Armin Retterath-3

No - only at
/etc/apache2/sites-available/default
;-)

Am 29.02.2016 15:31 schrieb "lukas.bollack" <[hidden email]>:
Hi Armin

Thanks, I'll try this tomorrow!

I thought these entrys have to be made in httpd.conf?

Lukas



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/MB-2-7-x-Can-t-save-wms-application-settings-tp5244512p5253389.html
Sent from the mapbender-users mailing list archive at Nabble.com.
_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users

_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

lukas.bollack
Ok - a bit confusing, in the wiki I think it says to make these entries in httpd.conf

Do I also need to make changes in mapbender.conf here?

# --------------------------------------------
# Definitions for HTTP Authentication
# --------------------------------------------
define('REALM', 'mapbender_registry');
define('NONCEKEY', 'mapbender');
$nonceLife = 300;
define('HTTP_AUTH_PROXY',"https://".$_SERVER['HTTP_HOST']."/http_auth"); //Problem - behind a rewrite rule - define it hardcoded?
#---------------------------------------------

Also I'm unsure if it's right if my entry for owsproxy is this:

define("OWSPROXY", "http://188.226.178.194/owsproxy");

This is the URL towards which the Alias /owsproxy points (or will be pointing)

Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

armin11
yes - you have to make this changes too. you may also define following
for your owsproxy (maybe the server will became a name somewhen ;-) ) -
and if you have no certificate please exchange https with http in the
HTTP_AUTH_PROXY definition

define("OWSPROXY", "http://".$_SERVER['HTTP_HOST']
."/owsproxy");


On 29.02.2016 15:46, lukas.bollack wrote:

> Ok - a bit confusing, in the wiki I think it says to make these entries in
> httpd.conf
>
> Do I also need to make changes in mapbender.conf here?
>
> # --------------------------------------------
> # Definitions for HTTP Authentication
> # --------------------------------------------
> define('REALM', 'mapbender_registry');
> define('NONCEKEY', 'mapbender');
> $nonceLife = 300;
> define('HTTP_AUTH_PROXY',"https://".$_SERVER['HTTP_HOST']."/http_auth");
> //Problem - behind a rewrite rule - define it hardcoded?
> #---------------------------------------------
>
> Also I'm unsure if it's right if my entry for owsproxy is this:
>
> define("OWSPROXY", "http://188.226.178.194/owsproxy");
>
> This is the URL towards which the Alias /owsproxy points (or will be
> pointing)
>
>
>
>
>
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/MB-2-7-x-Can-t-save-wms-application-settings-tp5244512p5253398.html
> Sent from the mapbender-users mailing list archive at Nabble.com.
> _______________________________________________
> Mapbender_users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapbender_users


--
Zentrale Stelle Geodateninfrastruktur
Rheinland-Pfalz
LVermGeo-RP

Von-Kuhl-Straße 49
56070 Koblenz

0261/492-466
[hidden email]
http://www.geoportal.rlp.de

_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

lukas.bollack
ok thanks!

Do I make the exact same entry, or do I need to customize this part? ".$_SERVER['HTTP_HOST']
."

My server has IP "http://188.226.178.194" and domain "naturnetz.com"
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

Armin Retterath-3
if you use the normal apache2 php5 module, the $_SERVER['HTTP_HOST']
 variable will give the server name like it is invoked to the php script. therefor it will work for named server as it work for invocation via ip ;-)

2016-02-29 15:57 GMT+01:00 lukas.bollack <[hidden email]>:
ok thanks!

Do I make the exact same entry, or do I need to customize this part?
".$_SERVER['HTTP_HOST']
."

My server has IP "http://188.226.178.194" and domain "naturnetz.com"



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/MB-2-7-x-Can-t-save-wms-application-settings-tp5244512p5253404.html
Sent from the mapbender-users mailing list archive at Nabble.com.
_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users


_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

lukas.bollack
ok so I just put it in exactly like this.


What about this part?

  ReWriteEngine On
  ProxyPreserveHost On
  SetEnv force-proxy-request-1.0 1
  SetEnv proxy-nokeepalive 1
  ProxyTimeout 50
  ProxyMaxForwards 3

Do I write this into /etc/apache2/sites-available/default or maybe in httpd.conf?

Also I'm confused about the entries in /etc/apache2/sites-available/default you gave me. In your example they have this form:

    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]+)\/?$ http://127.0.0.1/owsproxy/http/index.php?sid=$1\&wms=$2\& [P,L,QSA,NE]
         Options +Indexes
         Allow from all
    </Directory>

But in my /etc/apache2/sites-available/default there was already an Alias defined which looked like this:

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

Do you know why there is a difference in where there is a / and why there are " here while in your example there aren't any?
I know you can define an Alias with or without terminating slash and this defines if naturnetz.com/owsproxy will guide you to the right directory or naturnetz.com/owsproxy/. So I think it's correct to use no terminating slash in my configuration.
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

lukas.bollack
Also, when editing /etc/apache2/sites-available/default do I put the Aliases inside <VirtualHost *:80></VirtualHost> or outside?
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

Armin Retterath

inside ;-)

"lukas.bollack" <[hidden email]> hat am 1. März 2016 um 10:14 geschrieben:


Also, when editing /etc/apache2/sites-available/default do I put the Aliases
inside <VirtualHost *:80></VirtualHost> or outside?



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/MB-2-7-x-Can-t-save-wms-application-settings-tp5244512p5253548.html
Sent from the mapbender-users mailing list archive at Nabble.com.
_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users

> http://lists.osgeo.org/mailman/listinfo/mapbender_users






_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

Armin Retterath

hi lukas,

you don't need the


ReWriteEngine On
ProxyPreserveHost On
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
ProxyTimeout 50
ProxyMaxForwards 3


alias can be defined many times inside a virtual host - that is no problem

regards

armin

Armin Retterath <[hidden email]> hat am 1. März 2016 um 10:47 geschrieben:

inside ;-)

"lukas.bollack" <[hidden email]> hat am 1. März 2016 um 10:14 geschrieben:


Also, when editing /etc/apache2/sites-available/default do I put the Aliases
inside <VirtualHost *:80></VirtualHost> or outside?



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/MB-2-7-x-Can-t-save-wms-application-settings-tp5244512p5253548.html
Sent from the mapbender-users mailing list archive at Nabble.com.
_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users

> http://lists.osgeo.org/mailman/listinfo/mapbender_users






_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

lukas.bollack
In reply to this post by Armin Retterath
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
</Proxy>

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

</IfModule>

my httpd.conf is empty

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

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

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

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

        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 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

    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]+)\/?$ http://127.0.0.1/owsproxy/http/index.php?sid=$1\&wms=$2\& [P,L,QSA,NE]
         Options +Indexes
         Allow from all
    </Directory>

    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]+)?$ http://127.0.0.1/cors_proxy/http/index.php?wmsid=$1\& [P,L,QSA,NE]
          Options +Indexes
          Allow from all
    </Directory>

    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]+)\/?$ http://127.0.0.1/http_auth/http/index.php?layer_id=$1 [P,L,QSA,NE]
          Order allow,deny
          Allow from all
    </Directory> 

</VirtualHost>

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

# --------------------------------------------
# URL to owsproxy
# (no terminating slash)
# OWSPROXY_USE_LOCALHOST - use 127.0.0.1 and http for the requests if possible
# --------------------------------------------
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;
define('HTTP_AUTH_PROXY',"http://".$_SERVER['HTTP_HOST']."/http_auth"); //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 credentials.
Now when I click the getURL button in the GUI I get a URL like this: http://naturnetz.com/owsproxy/ks3p3ae2a3svhf3n7ugqj9sf06/45bcd5bfc8bc7f7ba12cb40981304185?. 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?
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

Armin Retterath

do you restart apache2?

sudo /etc/init.d/apache2 restart



"lukas.bollack" <[hidden email]> hat am 1. März 2016 um 11:02 geschrieben:


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
</Proxy>

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

</IfModule>

my httpd.conf is empty

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

<VirtualHost *:80>
ServerAdmin webmaster@localhost

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

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

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 127.0.0.0/255.0.0.0 ::1/128
</Directory>

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]+)\/?$
http://127.0.0.1/owsproxy/http/index.php?sid=$1\&wms=$2\& [P,L,QSA,NE]
Options +Indexes
Allow from all
</Directory>

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]+)?$
http://127.0.0.1/cors_proxy/http/index.php?wmsid=$1\& [P,L,QSA,NE]
Options +Indexes
Allow from all
</Directory>

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]+)\/?$
http://127.0.0.1/http_auth/http/index.php?layer_id=$1 [P,L,QSA,NE]
Order allow,deny
Allow from all
</Directory>

</VirtualHost>

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

# --------------------------------------------
# URL to owsproxy
# (no terminating slash)
# OWSPROXY_USE_LOCALHOST - use 127.0.0.1 and http for the requests if
possible
# --------------------------------------------
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;
define('HTTP_AUTH_PROXY',"http://".$_SERVER['HTTP_HOST']."/http_auth");
//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
credentials.
Now when I click the getURL button in the GUI I get a URL like this:
http://naturnetz.com/owsproxy/ks3p3ae2a3svhf3n7ugqj9sf06/45bcd5bfc8bc7f7ba12cb40981304185?.
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.
_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users

> http://lists.osgeo.org/mailman/listinfo/mapbender_users






_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

Armin Retterath

the rewrite rules must be in one line, maybe you copied it into the default file with a carriage return?

RewriteRule ^([\d]+)?$ http://127.0.0.1/cors_proxy/http/index.php?wmsid=$1\& [P,L,QSA,NE]

Armin Retterath <[hidden email]> hat am 1. März 2016 um 11:21 geschrieben:

do you restart apache2?

sudo /etc/init.d/apache2 restart



"lukas.bollack" <[hidden email]> hat am 1. März 2016 um 11:02 geschrieben:


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
</Proxy>

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

</IfModule>

my httpd.conf is empty

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

<VirtualHost *:80>
ServerAdmin webmaster@localhost

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

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

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 127.0.0.0/255.0.0.0 ::1/128
</Directory>

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]+)\/?$
http://127.0.0.1/owsproxy/http/index.php?sid=$1\&wms=$2\& [P,L,QSA,NE]
Options +Indexes
Allow from all
</Directory>

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]+)?$
http://127.0.0.1/cors_proxy/http/index.php?wmsid=$1\& [P,L,QSA,NE]
Options +Indexes
Allow from all
</Directory>

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]+)\/?$
http://127.0.0.1/http_auth/http/index.php?layer_id=$1 [P,L,QSA,NE]
Order allow,deny
Allow from all
</Directory>

</VirtualHost>

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

# --------------------------------------------
# URL to owsproxy
# (no terminating slash)
# OWSPROXY_USE_LOCALHOST - use 127.0.0.1 and http for the requests if
possible
# --------------------------------------------
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;
define('HTTP_AUTH_PROXY',"http://".$_SERVER['HTTP_HOST']."/http_auth");
//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
credentials.
Now when I click the getURL button in the GUI I get a URL like this:
http://naturnetz.com/owsproxy/ks3p3ae2a3svhf3n7ugqj9sf06/45bcd5bfc8bc7f7ba12cb40981304185?.
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.
_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users

> http://lists.osgeo.org/mailman/listinfo/mapbender_users






_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

lukas.bollack
yes i copied it with the return, but deleted them afterwards and put in a space.


I seem to have done some damage to my mapbender installation (or to the server) - I just noticed I can't upload any wms capabilities anymore! I always get an error when I try. The requests work in the browser, so they're fine. I'll post what's in my mapbender error log.
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

Armin Retterath
i tested the registration - it works without problems for external services ;-)

> "lukas.bollack" <[hidden email]> hat am 1. März 2016 um 11:25
> geschrieben:
>
>
> yes i copied it with the return, but deleted them afterwards and put in a
> space.
>
>
> I seem to have done some damage to my mapbender installation (or to the
> server) - I just noticed I can't upload any wms capabilities anymore! I
> always get an error when I try. The requests work in the browser, so they're
> fine. I'll post what's in my mapbender error log.
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/MB-2-7-x-Can-t-save-wms-application-settings-tp5244512p5253570.html
> Sent from the mapbender-users mailing list archive at Nabble.com.
> _______________________________________________
> Mapbender_users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapbender_users

--
Armin Retterath

Zentrale Stelle GDI-RP
LVermGeo Rheinland-Pfalz

Ferdinand-Sauerbruch-Straße 15
56073 Koblenz
Telefon 0261 492-466
Telefax 0261 492-492
[hidden email]
http://www.geoportal.rlp.de
_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

lukas.bollack
This is the error I'm getting right now:

2016.03.01, 05:41:55,ERROR: Javascript module not found:
2016.03.01, 05:42:53,ERROR: class_wms.php: code: c2019e4f3a3b1caf5c6198a4343bf249
2016.03.01, 05:42:53,ERROR: class_wms.php: codeSpace: http://sgdnord.rlp.de
2016.03.01, 05:42:53,ERROR: class_wms.php: datasetid: http://sgdnord.rlp.de#c2019e4f3a3b1caf5c6198a4343bf249
2016.03.01, 05:43:11,ERROR: Undeclared entity error in line 17
2016.03.01, 05:43:11,ERROR: class_wms: createObjFromXML: WMS http://wms.zh.ch/OrthoZHWMS?SERVICE=WMS&Request=GetCapabilities&Version=1.3.0 could not be loaded.
2016.03.01, 05:43:11,ERROR: class_wms: createObjFromXML: WMS <!DOCTYPE html>
<html>
<head>
  <title>Error 500: Interner Serverfehler</title>
  <style type="text/css"> body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; } h1 { font-size: 100%; color: #f00; line-height: 1.5em; } div.error-required-box{ width: 25em;margin: 2em ; background:#fbf2f2 url(http://www.zh.ch/assets/images/icons/achtung~before.png) 10px 10px no-repeat;background:#fbf2f2 url(http://www.zh.ch/assets/images/icons/achtung~before.svg) 10px 10px no-repeat;background-size:38px;padding:5px 51px 5px 72px;color:#c12323;margin-bottom:30px!important;border:2px solid #c12323!important} </style>    <link rel="stylesheet" type="text/css" href="/lib/GbZh/css/general.css"/>
     <link rel="stylesheet" type="text/css" href="apps/gb41build/resources/css/cdzh/app.css"/>
</head>

<body>
<div id="gbheaderzh-1056-body" class="x-panel-body zhheader x-panel-body-default" style="width: 1233px; left: 0px; top: 0px; height: 175px;"><div id="logo" role="banner">

<div>
<p class="identity one-line">
<strong>Kanton Zürich</strong> Startseite
</p>
</div>
</div>
<br/><br/><br/><br/>
<div id="gbheaderzh-1056-clearEl" class="x-clear" role="presentation"></div></div> 
 
  <div class="error-required-box">
   

Fehler 500: Interner Serverfehler.

    <p>Die Anfrage hat zu einem gröberen Fehler in unserer Software geführt. Falls Sie überzeugt sind, dass der Fehler auf unserer Seite liegt, kontaktieren Sie uns bitte.</p>
  </div>
  <div class="error-required-box">
   

Error 500: Internal Server Error.

    <p>We're sorry, but something went wrong, eventually contact us.</p>
  </div>
</body>
</html>
 could not be loaded.
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

Armin Retterath
hi lukas,

this seems to be a problem of the server when requesting it from your mapbender
application. it is not a problem of mapbender.

did you define a user agent like:
define("CONNECTION_USERAGENT", "Mapbender");

maybe the server need it ;-) or fake it to a browser user agent string
https://www.privacy-handbuch.de/handbuch_21e.htm

and please use wms 1.1.1 and not 1.3.0 - it will be easier if some other errors
occur later :-(

is mod-rewrite is enabled??
a2enmod rewrite

in your proxy.conf set
Allow from all instead Allow from localhost - but i'm not sure

after this restart apache2
/etc/init.d/apache2 restart
which files are in /etc/apache2/sites-available/
which files are in /etc/apache2/sites-enabled/
is the default file in both directories identical?

regards
armin




> "lukas.bollack" <[hidden email]> hat am 1. März 2016 um 11:32
> geschrieben:
>
>
> This is the error I'm getting right now:
>
> 2016.03.01, 05:41:55,ERROR: Javascript module not found:
> 2016.03.01, 05:42:53,ERROR: class_wms.php: code:
> c2019e4f3a3b1caf5c6198a4343bf249
> 2016.03.01, 05:42:53,ERROR: class_wms.php: codeSpace: http://sgdnord.rlp.de
> 2016.03.01, 05:42:53,ERROR: class_wms.php: datasetid:
> http://sgdnord.rlp.de#c2019e4f3a3b1caf5c6198a4343bf249
> 2016.03.01, 05:43:11,ERROR: Undeclared entity error in line 17
> 2016.03.01, 05:43:11,ERROR: class_wms: createObjFromXML: WMS
> http://wms.zh.ch/OrthoZHWMS?SERVICE=WMS&Request=GetCapabilities&Version=1.3.0
> could not be loaded.
> 2016.03.01, 05:43:11,ERROR: class_wms: createObjFromXML: WMS <!DOCTYPE html>
> <html>
> <head>
>   <title>Error 500: Interner Serverfehler</title>
>  
>     <link rel="stylesheet" type="text/css"
> href="/lib/GbZh/css/general.css"/>
>      <link rel="stylesheet" type="text/css"
> href="apps/gb41build/resources/css/cdzh/app.css"/>
> </head>
>
> <body>
> <div id="gbheaderzh-1056-body" class="x-panel-body zhheader
> x-panel-body-default" style="width: 1233px; left: 0px; top: 0px; height:
> 175px;"><div id="logo" role="banner">
> </img/logo.gif>
> <div>
> <p class="identity one-line">
> <strong>Kanton Z&uuml;rich</strong>  Startseite <http://www.zh.ch>  
> </p>
> </div>
> </div>
> <br/><br/><br/><br/>
> <div id="gbheaderzh-1056-clearEl" class="x-clear"
> role="presentation"></div></div>
>  
>   <div class="error-required-box">
>    
> Fehler 500: Interner Serverfehler.
>
>     <p>Die Anfrage hat zu einem gr&ouml;beren Fehler in unserer Software
> gef&uuml;hrt. Falls Sie &uuml;berzeugt sind, dass der Fehler auf unserer
> Seite liegt,  kontaktieren Sie uns
> <http://www.are.zh.ch/internet/baudirektion/are/de/geoinformation/karten_uebersicht/GIS-Browser/gis-browser_fragen.html#a-content>
>  
> bitte.</p>
>   </div>
>   <div class="error-required-box">
>    
> Error 500: Internal Server Error.
>
>     <p>We're sorry, but something went wrong, eventually  contact us
> <http://www.are.zh.ch/internet/baudirektion/are/de/geoinformation/karten_uebersicht/GIS-Browser/gis-browser_fragen.html#a-content>
>
> .</p>
>   </div>
> </body>
> </html>
>  could not be loaded.
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/MB-2-7-x-Can-t-save-wms-application-settings-tp5244512p5253572.html
> Sent from the mapbender-users mailing list archive at Nabble.com.
> _______________________________________________
> Mapbender_users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapbender_users

--
Armin Retterath

Zentrale Stelle GDI-RP
LVermGeo Rheinland-Pfalz

Ferdinand-Sauerbruch-Straße 15
56073 Koblenz
Telefon 0261 492-466
Telefax 0261 492-492
[hidden email]
http://www.geoportal.rlp.de
_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

lukas.bollack
hi Armin

I'm in a bit of a panic here. Those wms used to work, I uploaded them into my mapbender database and it was fine. Why is it not working anymore?

In my mapbender conf there is this line:
define("CONNECTION_USERAGENT", "Mapbender");

I worry that I might have messed up my wms table in the mapbender databse. I edited it manually (adding values in the username, password and connection method field of a wms service).

mod-rewrite is enabled.

/etc/apache2/sites-available/ and /etc/apache2/sites-enabled/ look like this:

Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

Armin Retterath
hi lukas,

i registered an external service in your application, and it works as expected.
in our geoportal the url
http://wms.zh.ch/OrthoZHWMS?SERVICE=WMS&Request=GetCapabilities&VERSION=1.1.1
also make trouble -
i check it local after lunch ;-)


regards

armin

> "lukas.bollack" <[hidden email]> hat am 1. März 2016 um 11:57
> geschrieben:
>
>
> hi Armin
>
> I'm in a bit of a panic here. Those wms used to work, I uploaded them into
> my mapbender database and it was fine. Why is it not working anymore?
>
> In my mapbender conf there is this line:
> define("CONNECTION_USERAGENT", "Mapbender");
>
> I worry that I might have messed up my wms table in the mapbender databse. I
> edited it manually (adding values in the username, password and connection
> method field of a wms service).
>
> mod-rewrite is enabled.
>
> /etc/apache2/sites-available/ and /etc/apache2/sites-enabled/ look like
> this:
>
> <http://osgeo-org.1560.x6.nabble.com/file/n5253577/folders.png>
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/MB-2-7-x-Can-t-save-wms-application-settings-tp5244512p5253577.html
> Sent from the mapbender-users mailing list archive at Nabble.com.
> _______________________________________________
> Mapbender_users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapbender_users

--
Armin Retterath

Zentrale Stelle GDI-RP
LVermGeo Rheinland-Pfalz

Ferdinand-Sauerbruch-Straße 15
56073 Koblenz
Telefon 0261 492-466
Telefax 0261 492-492
[hidden email]
http://www.geoportal.rlp.de
_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

lukas.bollack
hi armin

thanks a lot! yes some wms services I can registerd too, but some I can't! And for some reason all of those I can't are the ones I need for my application and they used to work! how is this possible?

I really hope it's something in the server configuration and not in the mapbender installation. I'll go crazy if I have to set up everything from scratch again!
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

Armin Retterath
In reply to this post by Armin Retterath
please deactivate Deny from all with a # in your proxy.conf:

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


> Armin Retterath <[hidden email]> hat am 1. März 2016 um 12:19
> geschrieben:
>
>
> hi lukas,
>
> i registered an external service in your application, and it works as
> expected.
> in our geoportal the url
> http://wms.zh.ch/OrthoZHWMS?SERVICE=WMS&Request=GetCapabilities&VERSION=1.1.1
> also make trouble -
> i check it local after lunch ;-)
>
>
> regards
>
> armin
>
> > "lukas.bollack" <[hidden email]> hat am 1. März 2016 um 11:57
> > geschrieben:
> >
> >
> > hi Armin
> >
> > I'm in a bit of a panic here. Those wms used to work, I uploaded them into
> > my mapbender database and it was fine. Why is it not working anymore?
> >
> > In my mapbender conf there is this line:
> > define("CONNECTION_USERAGENT", "Mapbender");
> >
> > I worry that I might have messed up my wms table in the mapbender databse. I
> > edited it manually (adding values in the username, password and connection
> > method field of a wms service).
> >
> > mod-rewrite is enabled.
> >
> > /etc/apache2/sites-available/ and /etc/apache2/sites-enabled/ look like
> > this:
> >
> > <http://osgeo-org.1560.x6.nabble.com/file/n5253577/folders.png>
> >
> >
> >
> > --
> > View this message in context:
> > http://osgeo-org.1560.x6.nabble.com/MB-2-7-x-Can-t-save-wms-application-settings-tp5244512p5253577.html
> > Sent from the mapbender-users mailing list archive at Nabble.com.
> > _______________________________________________
> > Mapbender_users mailing list
> > [hidden email]
> > http://lists.osgeo.org/mailman/listinfo/mapbender_users
>
> --
> Armin Retterath
>
> Zentrale Stelle GDI-RP
> LVermGeo Rheinland-Pfalz
>
> Ferdinand-Sauerbruch-Straße 15
> 56073 Koblenz
> Telefon 0261 492-466
> Telefax 0261 492-492
> [hidden email]
> http://www.geoportal.rlp.de
> _______________________________________________
> Mapbender_users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapbender_users

--
Armin Retterath

Zentrale Stelle GDI-RP
LVermGeo Rheinland-Pfalz

Ferdinand-Sauerbruch-Straße 15
56073 Koblenz
Telefon 0261 492-466
Telefax 0261 492-492
[hidden email]
http://www.geoportal.rlp.de
_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
123