OpenVPN-Admin
OpenVPN-Admin copied to clipboard
Client Configuration download issue on nginx
-
PHP version: PHP 7.0.22-0ubuntu0.16.04.1 (cli) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.22-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies
-
MySQL version: mysql Ver 14.14 Distrib 5.7.19, for Linux (x86_64) using EditLine wrapper
-
Webserver (Nginx, Apache...): Nginx
-
What is the expected behaviour? Can't download client config files it returns 500 HTTP Error
-
What do you see instead?
-
PHP logs on pastebin:
Miss PHP logs...
Fatal error: Uncaught RuntimeException: Directory name must not be empty. in /var/www/openvpn/index.php:41 Stack trace: #0 /var/www/openvpn/index.php(41): RecursiveDirectoryIterator->__construct('') #1 {main} thrown in /var/www/openvpn/index.php on line 41
Warning: Unknown: Cannot destroy the zip context: Can't remove file: No such file or directory in Unknown on line 0
What is the content of the openvpn-admin/client-conf in your install directory?
gnu-linux osx-viscosity windows
is it any methods to fix this issue? I guess it maybe it needs some line of nginx configuration to make it works.
is it any methods to fix this issue? I guess it maybe it needs some line of nginx configuration to make it works.
Not sure: you mean you didn't configure your vhost as mentioned here?
Here is my nginx configuration for openvpn admin
server {
listen 80;
listen [::]:80;
listen 8080 ssl ;
listen [::]:8080 ssl ;
server_name secure-vpn.techrino.net;
root /var/www/openvpn;
index index.php index.html;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# # With php7.0-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php7.0-fpm:
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
}
And what is the content of /var/www/openvpn-admin/client-conf/?
techrino@ubuntu-512mb-sgp1-01:/var/www/openvpn/openvpn-admin/client-conf$ ls -la total 20 drwxr-xr-x 5 www-data www-data 4096 Aug 29 10:00 . drwxr-xr-x 8 www-data www-data 4096 Aug 29 10:00 .. drwxr-xr-x 2 www-data www-data 4096 Aug 29 10:31 gnu-linux drwxr-xr-x 2 www-data www-data 4096 Aug 29 13:54 osx-viscosity drwxr-xr-x 2 www-data www-data 4096 Aug 29 10:31 windows