Nginx Vhost Templates

Discussion in 'Server Operation' started by Barragán Louisenbairn, Jan 15, 2021.

  1. Hello:
    After a successful instalation of ISPConfig in my production server, I have some questions. I want to use IP: port sockets in my Nginx configuration, but when I create a new webpage this file is created with a file socket type. There is any way to modify this template? (sorry, my knowledge about nginx and php could be very limited and that maybe is the main problem here jajajaj)
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I won't recommend doing that. Using ports is slower, uses more resources and is less secure.
     
    ahrasis likes this.
  3. Ok, thanks for the advice, but can you explain a bit more this issue? I readed anywhere that the ports are faster than files because using socket files use disk ressources and that I/O action can consume more time than the ports (in ram)... Maybe I am really wrong with my knowledge and ISPConfig works in another way.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I know ISP companies that benchmarked this in real-world applications and production hosting systems and they all came to the conclusion that sockets are faster and use less resources. Plus using ports on a system that hosts more than one client potentially allows another client to run php scripts under a different user by connecting to a different php-fpm port as you can't restrict access to ports by Linux user while you can restrict access to a socket file by user.
     
  5. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    A unix socket does not use the disk, it is a kernel construct that handles inter-process I/O via the filesystem interface, whereas tcp sockets handle I/O via the networking layers, which have a lot more overhead. The additional benefits @till mentioned are likely more important than the performance benefits in most environments, but in this case you get both.
     
    Last edited: Jan 20, 2021
  6. Thanks a lot for your help and knowledge :)
     

Share This Page