<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">Hi,</div><div class=""><br class=""></div>Why not just create 2 server blocks, one for root domain and the other for WP multisite subdomains?<div class=""><br class=""></div><div class="">As in:</div><div class=""><br class=""></div><div class=""><font face="Courier New" class="">server {</font></div><div class=""><font face="Courier New" class="">  server_name <a href="http://example.com" class="">example.com</a> <a href="http://www.example.com" class="">www.example.com</a>;</font></div><div class=""><font face="Courier New" class="">  … Laravel directives go here</font></div><div class=""><font face="Courier New" class="">}</font></div><div class=""><font face="Courier New" class=""><br class=""></font></div><div class=""><font face="Courier New" class="">server {</font></div><div class=""><font face="Courier New" class="">  server_name *.<a href="http://example.com" class="">example.com</a>;</font></div><div class=""><font face="Courier New" class="">  .. WP multisite directives go here</font></div><div class=""><font face="Courier New" class="">}</font></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Best Regards,</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Danila</div></div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On 17 Aug 2018, at 16:49, conquistadorjd <<a href="mailto:nginx-forum@forum.nginx.org" class="">nginx-forum@forum.nginx.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">I am running a wordpress multisite website with subdomain option. <a href="http://example.me" class="">example.me</a><br class="">is my main website <a href="https://one.example.me" class="">https://one.example.me</a>, <a href="https://two.example.me/two" class="">https://two.example.me/two</a> etc<br class="">are the network websites.<br class=""><br class="">Now I am planning to have a small laravel application accessible at<br class=""><a href="http://example.me" class="">example.me</a>. I tried using different combination but not able to figure this<br class="">out. Could not find any examples in search results as well.Can someone let<br class="">me know how can I use laravel webapp at main/root address <a href="https://example.me" class="">https://example.me</a><br class="">and mutilsite with subdomain ?<br class=""><br class="">I am new to NGINX. Here is my nginx code.<br class=""><br class="">map $http_host $blogid {<br class="">    default 0;<br class="">    include<br class="">/var/www/goingplacesme/wp-content/uploads/nginx-helper/map.conf;<br class="">}<br class=""><br class="">server {<br class="">        listen 80;<br class="">        listen [::]:80;<br class=""><br class="">        root /var/www/exampleme;<br class=""><br class="">        index index.html index.htm index.nginx-debian.html;<br class=""><br class="">        server_name <a href="http://example.me" class="">example.me</a> <a href="http://www.example.me" class="">www.example.me</a>;<br class=""><br class="">        location / {<br class="">                #try_files $uri $uri/ =404;<br class="">                try_files $uri /index.php$is_args$args;<br class="">        }<br class=""><br class="">        # pass the PHP scripts to FastCGI server listening on<br class="">127.0.0.1:9000<br class="">        location ~ \.php$ {<br class="">                include snippets/fastcgi-php.conf;<br class=""><br class="">                # With php7.0-cgi alone:<br class="">                #fastcgi_pass 127.0.0.1:9000;<br class="">                # With php7.0-fpm:<br class="">                fastcgi_pass unix:/run/php/php7.0-fpm.sock;<br class="">        }<br class=""><br class="">        # deny access to .htaccess files, if Apache's document root<br class="">        # concurs with nginx's one<br class="">        #<br class="">        #location ~ /\.ht {<br class="">        #       deny all;<br class="">        #}<br class="">        location ~ ^/files/(.*)$ {<br class="">          try_files /wp-content/blogs.dir/$blogid/$uri<br class="">/wp-includes/ms-files.php?file=$1 ;<br class="">          access_log off; log_not_found off; expires max;<br class="">        }<br class=""><br class="">        location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {<br class="">                expires 24h;<br class="">                log_not_found off;<br class="">        }<br class=""><br class="">        location ^~ /blogs.dir {<br class="">                internal;<br class="">                alias /var/www/pathtoyoursite/web/wp-content/blogs.dir ;<br class="">                access_log off; log_not_found off;      expires max;<br class="">        }<br class=""><br class=""><br class=""><br class="">        if (!-e $request_filename) {<br class="">                rewrite /wp-admin$ $<a href="scheme://$host$uri/" class="">scheme://$host$uri/</a> permanent;<br class="">                rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) $1 last;<br class="">                rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ $1 last;<br class="">        }<br class=""><br class="">}<br class=""><br class="">Posted at Nginx Forum: <a href="https://forum.nginx.org/read.php?2,280904,280904#msg-280904" class="">https://forum.nginx.org/read.php?2,280904,280904#msg-280904</a><br class=""><br class="">_______________________________________________<br class="">nginx mailing list<br class=""><a href="mailto:nginx@nginx.org" class="">nginx@nginx.org</a><br class="">http://mailman.nginx.org/mailman/listinfo/nginx<br class=""></div></div></blockquote></div><br class=""></div></body></html>