How configure a Virtual Host in pfSense 2.3.2-RELEASE



  • Hi,

    I need to know, how configure a virtual host in this version 2.3.2?

    Thanks.



  • What do you mean by vIrtual host?  A Virtual IP or a LAN server port-forwarded to WAN?  Or a web virtual host or reverse proxy?



  • Virtual Host WEB, "Vhosts" as in previous versions.



  • Hi.

    Maybe running another instance of nginx listen at one Virtual IP

    You have to edit: /usr/local/etc/nginx/nginx.conf and the server section :
    for example:

    
    # /usr/local/etc/nginx/nginx.conf
    # server
    
    server {
    #LISTEN     YOUR VIRTUAL IP:80;
    listen      10.0.0.253:80;
    server_name  your-domain.localdomain.local;
    
    #charset koi8-r;
    
    #access_log  logs/host.access.log  main;
    
    location / {
    root   /usr/local/www/nginx;
    index  index.html index.htm;
    
    

    And run from shell the nginx instance with

     /usr/local/etc/rc.d/nginx onestart
    

    If you wish your nginx instance run at reboot, add it to config.xml before label :

    <shellcmd>/usr/local/etc/rc.d/nginx onestart</shellcmd>
    

    Regards



  • This smells like a question for the cache/proxy subforum.



  • Hi.

    @kpa:

    This smells like a question for the cache/proxy subforum.

    Not necessarily, if I only want a web http server (for whatever reason) independent of the gui.

    Regards.