Save configuration vhost NGINX

Discussion in 'Installation/Configuration' started by Nico08FR, May 17, 2022.

  1. Nico08FR

    Nico08FR New Member

    Hello,
    I'm french and noob with Ispconfig ! Sorry for my english and my querry can be easy for you !

    I search solution for my configuration server.

    I need vhost NGINX for my CMS Magento 2.

    When i save configuration for my site in ISPCONFIG, he delete my vhost create manually with vhost basic.

    Here my Vhost : ($$$$$$$$$ = mon site ;) )

    map $http_host $MAGE_RUN_CODE {
    $$$$$$$$$ mysite}
    server {
    listen *:80;
    listen [::]:80;
    listen *:443 ssl http2;
    ssl_protocols TLSv1.3 TLSv1.2;
    listen [::]:443 ssl http2;
    ssl_certificate /var/www/clients/client0/web3/ssl/$$$$$$$$$-le.crt;
    ssl_certificate_key /var/www/clients/client0/web3/ssl/$$$$$$$$$-le.key;
    server_name $$$$$$$$$;
    error_log /var/log/ispconfig/httpd/$$$$$$$$$/error.log;
    access_log /var/log/ispconfig/httpd/$$$$$$$$$/access.log combined;
    set $MAGE_ROOT /var/www/clients/client0/web3/web;
    include /var/www/clients/client0/web3/web/nginx.conf;
    }

    With this vhost, my webshop is work.

    I try change in nginx Directives but not work for me.
    Can be not good solution or not good syntax... i don't know.

    Have you solution for me please ?

    Thank you by advance for your help.
    Best regards, Nico
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    ahrasis likes this.
  3. Nico08FR

    Nico08FR New Member

    Hi Taleman,
    Thank you for your response. I'll check list topic.

    Yes, i know... ISPCONFIG is not perfect solution for Magento2 but i have others webshop on this server : Prestashop and Wordpress.
    I like Ispconfig :)
    My Magento work actually but after each save in configuration. I reinstall my vhost... It's not good !
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Magento works fine on ISPConfig Nginx systems using the Nginx directives field. Do what @Taleman suggested, many users use Magento on ISPConfig and several of them posted their configs for the Nginx directives field.

    That's just because you manually edited the vhost file, never manually edit a vhost written by ISPConfig, and always use the Nginx directives field. And yes, the directives for that field are different because they get inserted into a server block, that's why you need the proper directives and can not copy a stock config that ships with Magento. But there are examples posted on the internet, so no need to reinvent the wheel.
     
  5. Nico08FR

    Nico08FR New Member

    Hi Till,
    Ok :) i undertsand.
    Thank you for your response.
     

Share This Page