August 01, 2020 01:10PM
Hi,

I am running nginx version: nginx/1.16.1 on CentOS Linux release 7.8.2003
(Core). I am setting up the Nginx subsite configuration. The details are as
follows.

[root@developerportal www]# pwd
/var/www
[root@developerportal www]# ls -l
total 0
drwxr-xr-x 2 root root 6 Apr 2 18:44 cgi-bin
drwxr-xr-x 3 nginx nginx 64 Jun 10 13:52 *drupal*
drwxr-xr-x 3 nginx nginx 28 Aug 1 12:32 *drupalsubsite*
drwxr-xr-x 2 root root 6 Apr 2 18:44 html
[root@developerportal www]#
[root@developerportal web]# pwd
/var/www/drupal/marketplace-v2/mpV2/web
[root@developerportal web]# ls -l
total 73576
-rwxr-xr-x 1 nginx nginx 385 Jul 28 18:25 autoload.php
drwxrwxrwx 12 nginx nginx 4096 Jun 11 14:21 core
-rw-r--r-- 1 nginx nginx 75310608 Aug 1 11:18 db.sql
-rwxr-xr-x 1 nginx nginx 549 Jul 26 18:47 index.php
drwxrwxrwx 14 nginx nginx 286 Jul 28 18:25 libraries
drwxrwxrwx 6 nginx nginx 101 Jul 26 18:47 modules
drwxrwxrwx 2 nginx nginx 22 Jul 26 18:47 profiles
lrwxrwxrwx 1 nginx nginx 47 Aug 1 16:23 *retail* ->
/var/www/drupalsubsite/marketplace-v2/mpV2/web/
-rwxr-xr-x 1 nginx nginx 1594 Jul 26 18:47 robots.txt
drwxrwxrwx 3 nginx nginx 112 Jul 26 18:47 sites
drwxrwxrwx 4 nginx nginx 69 Jul 26 18:47 themes
-rwxr-xr-x 1 nginx nginx 848 Jul 26 18:47 update.php
-rwxr-xr-x 1 nginx nginx 4566 Jul 26 18:47 web.config
[root@developerportal web]#

I have set the below in /etc/nginx/nginx.conf

location ~ ^/retail/(.*) {
> return 301 /var/www/drupalsubsite/marketplace-v2/mpV2/web;
> index index.php;
> }


When I hit https://developerportal.example.com/retail
I get
https://developerportal.example.com/var/www/drupalsubsite/marketplace-v2/mpV2/web
in the browser I get The requested page could not be found instead of
serving the web page.

When I hit https://developerportal.example.com/retail/user
I get
https://developerportal.example.com/var/www/drupalsubsite/marketplace-v2/mpV2/web
in the browser I get The requested page could not be found instead of
serving the web page.

When I hit https://developerportal.example.com/retail/user/login
I get
https://developerportal.example.com/var/www/drupalsubsite/marketplace-v2/mpV2/web
in the browser I get The requested page could not be found instead of
serving the web page.

Any help will be highly appreciated. Please let me know if you need any
additional configuration and I look forward to hearing from you soon.
Thanks in advance.

Best Regards,

Kaushal
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx subsite configuration not working

kaushalshriyan August 01, 2020 01:10PM

Re: nginx subsite configuration not working

Thomas Ward August 01, 2020 01:14PM

Re: nginx subsite configuration not working

kaushalshriyan August 01, 2020 07:50PM

Re: nginx subsite configuration not working

kaushalshriyan August 02, 2020 06:42AM

Re: nginx subsite configuration not working

mike-pt August 02, 2020 09:36AM

Re: nginx subsite configuration not working

kaushalshriyan August 02, 2020 12:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 300
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready