virtualmin + nginx

Hello
I’am sorry for my bad english

I am a user of Virtualmin for a few years … and I had a problem since I installed nginx with Virtualmin.

I use nginx as proxy for the static content of all my Website hosted on Virtualmin, so I was changed the listening port of apache2 and vhost in 8081, nginx receive on port 80 for static content and the rest is on port 8081 for apache2

everything works fine except a detail, since this change I can’t manage the website option from the Virtualmin interface, for example when I click on “Website Options” in the “Server Configuration” I receive this message:

Website options cannot be edited, as no Apache virtual host for my-website.com port 80 was found!

in addition,i can’t see the apache log file (error_log and acces_log) from Virtualmin, the tab has disappeared since this change,

thank you in advance for your help and good luck to Virtualmin ,wich has become an important thing for all my hosting servers, nice work thank you to all the team

jonigood.

Howdy,

Yeah, Virtualmin expects that Apache is the only webserver on your system – and thinks something is broken when it’s not running on port 80.

There isn’t really a supported method of using a proxy on port 80, and Apache on an alternate port.

That said – I’ll talk to Jamie to see about adding support for that into Virtualmin.

-Eric

thank you for your answer

I am looking in webmin configuration file and I find a partially solution of my problem, I post here the solution that can help someone else :

In /etc/webmin/virtual-server/domains

there is all domains created by Virtualmin numbered like this:

131723426823795 13172463203357 13178722157623 …

now you choose once above wich correspond to your domain :

vi /etc/webmin/domains/131723426823795

you find “web_port=80”
you chnage for “web_port=8081”
you save and close file

you restart webmin
/etc/init.d/webmin restart

after this you can see and modify all option siteweb in a virtualmin interface :slight_smile:

there is only one problem,i still looking for a solution to bring up the section of log apache2, I’m still searching a solution to resolve this problem, if you have an idea please help :slight_smile:

thank you for your respond

to make this automatic action by Virtualmin for creatation of new virtual server using Virtualmin initeface you edit :

vi /etc/webmin/virtual-server/config

you change “web_port=80” for “web_port=8081” you save and close file, restart webmin …

Now it’s automatic, Virtualmin can find the configuration apache2 of your virtual servers even if it not on port 80.

:wink:

Problem solved for log apache2

just (after changing the /etc/webmin/virtual-server/config file as explained above) re create their virtual server with Virtualmin, now you have all disponnible option even if your server apache2 is not on port 80

cordially
jonigood

hi Eric

I decided to create a module for Virtualmin to manage nginx and add a virtual host without having to manually edit each time the config file of apache, nginx and webmin…

But i not find any link to explain the creation of Virtualmin modules, you have a link to give me ?

thank you

Howdy,

Well, note that Jamie is currently working on Nginx support for Virtualmin – it should be ready within a few weeks.

That said, if you’re still interested in giving that a shot, there’s information on creating modules here:

http://www.virtualmin.com/documentation/developer/plugins

http://doxfer.webmin.com/Webmin/TheWebminAPI

hi

if Jamie is working on Nginx support i wait
it will be better that my module… lol

thank you for all

Awesome! Any update on when nginx support will be ready?

Nginx support is coming along. We don’t have any specific dates, but keep an eye out in the News forum for updates, there should be something there soon. He may even post a note there in the News forum looking for beta testers if you’re interested in that.

-Eric

Hey Eric,

I’d be happy to test.

Thanks
Keith

check that link :
http://www.virtualmin.com/documentation/web/nginx

You guys are certainly on the ball keeping an eye on that documentation! :slight_smile:

Nginx support is still coming along, it should be here soon!

Jamie just added those docs yesterday, and is still finishing them up. But to my knowledge, they’ll soon be doing a beta test, and an announcement about that will be in the News forum.

-Eric

Hopefully the documentation will also focus on moving from an Apache setup to Nginx. :wink:

I was praying that Virtualmin will support that web server so I’m always on the lookout !
(sorry to be late, but I’m in France that can explain the delay between the post and its discovery :wink:

Hopefully the documentation will also focus on moving from an Apache setup to Nginx

Out of the box, there’s going to be no quick and simple way to perform a migration. The Nginx setup is going to be for folks with new installations. There isn’t a simple way to migrate the Apache config over to Nginx, unfortunately.

Will there be in the future? Maybe! But, the first goal is to make it so that Virtualmin supports Nginx. A goal for the future is to handle migrations from Apache to Nginx.

-Eric

Will it be possible to setup a new server for Nginx and then import/restore a backup of each virtual server to it?

That would be awesome !

Will it be possible to setup a new server for Nginx and then import/restore a backup of each virtual server to it?

Unfortunately not!

Not initially, anyhow.

Getting Virtualmin to support Nginx at all was crazy hard, and Jamie is putting the finishing touches on that.

Coming up with a way to convert an Apache config to an Nginx config is also tricky – and we didn’t want that to hold up the release of Nginx.

So, Nginx support will be released here soon – it’ll only work on new installations with new Virtual Servers, there isn’t any sort of conversion from existing Virtual Servers.

There may be a way to do that in the future, but we don’t know any details there yet; we’re currently just concerned with getting Nginx support out the door :slight_smile:

Now, that’s not to say that it can’t be done with some manual work.

If you were to first create a Virtual Server on your new Nginx server – I believe you could then perform a restore of a backup file that once ran on Apache, and simply uncheck the option to restore the “Apache webserver configuration”, as well as other incompatible features.

Once you’ve unchecked all the incompatible features, you should then be able to restore that backup onto the newly created Virtual Server on your system running Nginx.

-Eric

can you release it for virtualmin GPL too? :-/
btw i read that Documentation but i would like to use nginx as frond-end proxy server not main server for php handling… will it support that type?