Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2796

Configuring Nginx on WSL Ubuntu on Windows 11. Config errors

$
0
0

Im having some issues configuring a virtual host in nginx. I followed this tutorial.

How to Install Magento 2 on Ubuntu with Windows 10/11 WSL

My vhost code in sites available looks like this:

server { listen 80; localhost http://localhost.t3chn0.com; root /var/www/html/te3chn0.com/; index index.php; location / {     try_files $uri $uri/ /index.php?$args; } location ~ \.php$ {     include snippets/fastcgi-php.conf;     fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; } location ~ /\.ht {     deny all; } 

}

that returns this error:

t3chn0@MikesYoga:/var/www/html$ sudo nginx -t nginx: [emerg] unknown directive "t3chn0" in /etc/nginx/sites-enabled/t3chn0.com:3 nginx: configuration file /etc/nginx/nginx.conf test failed

When I clone the default file I get this error instead.

t3chn0@MikesYoga:/etc/nginx/sites-available$ sudo nginx -t nginx: [emerg] open() "/etc/nginx/sites-enabled/default" failed (2: No such file or directory) in /etc/nginx/nginx.conf:60 nginx: configuration file /etc/nginx/nginx.conf test failed

Does anyone have any tips on what I might be doing wrong here? I'm new to Nginx. I could have figured this out in Apache.

Thanks in adavance


Viewing all articles
Browse latest Browse all 2796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>