How to convert Apache configuration to NGINX

I am moving from Apache to NGINX and I need to convert the following virtual server configuration to NGINX.

<VirtualHost *:80> DocumentRoot /var/www/myproject/web ServerName myproject.dev ServerAlias myproject.dev <Directory /var/www/myproject/web> AllowOverride All Order allow,deny Allow from All </Directory> </VirtualHost> 

What will be the "exact translation" of this to NGINX?

+6
source share
2 answers
 server { listen 80; server_name myproject.dev; root /var/www/myproject/web; } 

Start here http://wiki.nginx.org/Configuration .

+6
source

Maybe this will help, just check and try this;)

https://github.com/nhnc-nginx/apache2nginx

+1
source

Source: https://habr.com/ru/post/970603/


All Articles