Error Creating New NGINX VHost from Webmin

20 posts / 0 new
Last post
#1 Fri, 10/05/2012 - 17:13
mtleng

Error Creating New NGINX VHost from Webmin

When accessing virtualmin-nginx module from Webmin (Servers>Nginx Webserver) and selecting the link "Add a new Nginx virtual host", I get the following error after entering all the applicable info and hitting the Create button:

Error - Perl execution failed

Can't use string ("/home/testdomain1/public_html") as an ARRAY ref while "strict refs" in use at virtualmin-nginx-lib.pl line 247.

This on a fresh install with Debian 6 and all up-to-date.

I could however create a vhost from the Virtualmin side, but would prefer to do everything via only Webmin.

Any suggestions? Is this a known bug?

Fri, 10/05/2012 - 22:20
andreychek

Howdy,

That does indeed sound like a bug... could you post that as a bug report using the Support link above?

Then Jamie will be able to work with you to figure out what's going on there.

Thanks!

-Eric

Sun, 11/25/2012 - 08:57
acidslayer

I have this problem. who can help me?

Config: Last webmin + virtualmin and -bash-3.2# nginx -v nginx version: nginx/1.3.8

Wed, 04/10/2013 - 15:42
marowo

Had the same issue.

I fixed it by adding the following line at the end to /etc/nginx/nginx.conf

include /etc/nginx/sites-enabled/*;

it will look like:

http { include /etc/nginx/mime.types; default_type application/octet-stream;

log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                  '$status $body_bytes_sent "$http_referer" '
                  '"$http_user_agent" "$http_x_forwarded_for"';

access_log  /var/log/nginx/access.log  main;

sendfile        on;
#tcp_nopush     on;

keepalive_timeout  65;

#gzip  on;

include /etc/nginx/conf.d/*.conf;
server_names_hash_bucket_size 128;
include /etc/nginx/sites-enabled/*;

}

I installed nginx 1.2.8 described here http://wiki.nginx.org/Install#Official_Debian.2FUbuntu_packages with the key: wget http://nginx.org/keys/nginx_signing.key cat nginx_signing.key | sudo apt-key add -

Thu, 07/11/2013 - 10:51
ahrboktrexon

no way... I just installed nginx module for virtualmin (4.01.gpl GPL) under centos 6.4, but I have the same problem, I added also the above line to the /etc/nginx/nginx.conf but the problem is still here... can you help?

thank you

Thu, 08/22/2013 - 07:34
Schnuecks

Hello i had the same problem to. The include doesn't help.

thanks

btw: a nginx server template would be nice

Thu, 08/29/2013 - 07:03
orbic1

Hello there

We have a box running Ubuntu Linux 12.04 - 3.98.gpl GPL. The include /etc/nginx/sites-enabled/*; is already in place and we still get exactly the same error as above.

Has anybody managed to solve this issue?

Thanks

Fri, 08/30/2013 - 18:37
patrickk

Hi there,

Me too. Got the Perl problem on line 247 - but I have already the 'sites-enabled' thing... Nothing helped. I'm using a dedicated centos 6, all updated applied.

Any idea?

Sun, 09/15/2013 - 21:49
jsp_1983

Just adding a 'me too' to the problem.

Sat, 09/28/2013 - 11:38
RealGecko

+1 I have include /etc/nginx/sites-enabled/*; line at the end of http block in nginx.conf and see this error. Any solutions?

Sun, 11/10/2013 - 14:47
maarten.leynse

see this post : http://devkardia.com/blog/virtualmin-apache-and-nginx-reverse-proxy.html

when making new virtual-server, do not select "Enable Nginx website"

and after your virtual-server setup go to nginx in webmin servers, adjust document root and set Any IPv4 address

hope it helps some people on their way.

regards

Sat, 07/05/2014 - 20:19
Arvi89

Bug still here :(

Mon, 11/03/2014 - 05:58
jlc

Same problem, using nginx-1.6 in CentOS 6.6 & virtualmin 4.11 gpl

Sun, 01/04/2015 - 13:03
bstar

Debian 7, Virtualmin 4.12

Same bug.

Wed, 11/25/2015 - 18:56
leofishman

Ubuntu Linux 14.04.2 Webmin version 1.770 Virtualmin version 4.18.gpl same problem

Thu, 11/26/2015 - 01:19
RealGecko

Try this: https://github.com/Real-Gecko/virtualmin-nginx-fpm

I've created it as an alternative to Virtualmin core Nginx module :)

Thu, 11/26/2015 - 20:01
leofishman

RealGecko, Works great!

Thanks a lot

Now my only problem is that I want to have apache and nginx on some virtual servers, I have 2 Ip's and apache and nginx running on different ports, but virtualmin won't let me have both, do you know if its possible?

thanks again!

Fri, 11/27/2015 - 01:06 (Reply to #17)
RealGecko

I never tried running both Apache and Nginx under Virtualmin, so I can't tell you if it is possible :(

Fri, 11/27/2015 - 04:50
leofishman

You have helped me a lot!!! many thanks

Sat, 03/26/2016 - 10:12
urgensherpa

Same problem. webmin/virtualmin 1.782 debian 8 linux

Topic locked