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 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?


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.



I have this problem.
who can help me?

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

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 with the key: wget
cat nginx_signing.key | sudo apt-key add -

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

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


btw: a nginx server template would be nice

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?


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?

Just adding a ‘me too’ to the problem.

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

see this post :

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.


Bug still here :frowning:

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

Debian 7, Virtualmin 4.12

Same bug.

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

Try this:

I’ve created it as an alternative to Virtualmin core Nginx module :slight_smile:

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!

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

You have helped me a lot!!!
many thanks

Same problem.
webmin/virtualmin 1.782
debian 8 linux