Hello guys,
I've installed a server with zabbix in a site that I access using vpn, the problem is, this server has 2 network interfaces and I'm able to access only by local network interface. When I try to access from the vpn interface, zabbix don't show, but I can access apache's default page.
I ran this commands by the vpn interface from my computer:
Somehow apache is redirecting the connection when I try to access zabbix web interface. This is the zabbix apache2.conf:
And this is the zabbix.conf on /etc/apache2/conf-avaliable:
There's no firewall blocking access.
I've installed a server with zabbix in a site that I access using vpn, the problem is, this server has 2 network interfaces and I'm able to access only by local network interface. When I try to access from the vpn interface, zabbix don't show, but I can access apache's default page.
I ran this commands by the vpn interface from my computer:
Code:
# curl -IL http://xx.xxx.xxx.xx/zabbix HTTP/1.1 301 Moved Permanently Date: Wed, 22 Aug 2018 08:46:00 GMT Server: Apache/2.4.18 (Ubuntu) Location: http://xx.xxx.xxx.xx/zabbix/ Content-Type: text/html; charset=iso-8859-1 HTTP/1.1 200 OK Date: Wed, 22 Aug 2018 08:46:00 GMT Server: Apache/2.4.18 (Ubuntu) Set-Cookie: zbx_sessionid=d9x88eeccd4970b78c065861bbb1985c; HttpOnly Set-Cookie: PHPSESSID=ohqixmr4euo9n0olss6117a500; path=/zabbix/; HttpOnly Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate Pragma: no-cache X-Content-Type-Options: nosniff X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN Content-Type: text/html; charset=UTF-8 # curl -IL http://xx.xxx.xxx.xx/ HTTP/1.1 200 OK Date: Wed, 22 Aug 2018 08:47:43 GMT Server: Apache/2.4.18 (Ubuntu) Last-Modified: Fri, 13 Apr 2018 13:37:05 GMT ETag: "2c39-569baf7cbfb0b" Accept-Ranges: bytes Content-Length: 11321 Vary: Accept-Encoding Content-Type: text/html
Code:
$ cat apache2.conf
Mutex file:${APACHE_LOCK_DIR} default
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
AccessFileName .htaccess
<FilesMatch "^\.ht">
Require all denied
</FilesMatch>
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf
Code:
# Define /zabbix alias, this is the default
<IfModule mod_alias.c>
Alias /zabbix /usr/share/zabbix
</IfModule>
<Directory "/usr/share/zabbix">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
<IfModule mod_php5.c>
php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value always_populate_raw_post_data -1
# php_value date.timezone Europe/Riga
</IfModule>
<IfModule mod_php7.c>
php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value always_populate_raw_post_data -1
php_value date.timezone America/Bahia
</IfModule>
</Directory>
<Directory "/usr/share/zabbix/conf">
Order deny,allow
Deny from all
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>
<Directory "/usr/share/zabbix/app">
Order deny,allow
Deny from all
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>
<Directory "/usr/share/zabbix/include">
Order deny,allow
Deny from all
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>
<Directory "/usr/share/zabbix/local">
Order deny,allow
Deny from all
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>
There's no firewall blocking access.