Magento 2 install to subfolder problem
I am installing Magento 2 into a subdirectory beside the main installation. I would like to configure the subdirectory named "test". However, when I try to access localhost/test to enter the setup page, it just tells:
localhost redirected you too many times. Try clearing your cookies. ERR_TOO_MANY_REDIRECTS.
Here is my NGINX config :
server {
listen 80 reuseport;
server_name localhost;
access_log /var/log/nginx/access.log ;
error_log /var/log/nginx/error.log ;
set $MAGE_ROOT /var/www/magento2;
root $MAGE_ROOT/pub;
## Magento Setup Tool
include conf_m2/setup.conf;
# Deny all internal locations also default phpmyadmin
location ~ ^/(app|bin|var|tmp|phpserver|vendor|magento_version|php[mM]y[aA]dmin|pma)/? { deny all; }
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
## Static location
include conf_m2/assets.conf;
location @static { rewrite /static/(versiond*/)?(.*)$ /static.php?resource=$2 last; }
location @media { try_files $uri $uri/ /get.php$is_args$args; }
## Process php files (strict rule, define files to be executed)
location ~ (index|health_check|get|static|report|404|503).php$ {
try_files $uri =404;
include conf_m2/php_backend.conf;
fastcgi_cache microcache;
fastcgi_cache_key $scheme|$host|search|$arg_q;
fastcgi_cache_valid 200 301 302 2h;
fastcgi_cache_use_stale updating error timeout invalid_header http_500;
fastcgi_pass_header Set-Cookie;
fastcgi_pass_header Cookie;
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
}
###Here is the directory I want to installed another magento 2, but it now works
rewrite ^/test /test/$1 permanent;
location /test {
try_files $uri /$uri/index.php?$args;
index index.php index.html index.htm;
}
rewrite ^/test/admin /test/admin/$1 permanent;
}
magento2 installation
bumped to the homepage by Community♦ 9 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I am installing Magento 2 into a subdirectory beside the main installation. I would like to configure the subdirectory named "test". However, when I try to access localhost/test to enter the setup page, it just tells:
localhost redirected you too many times. Try clearing your cookies. ERR_TOO_MANY_REDIRECTS.
Here is my NGINX config :
server {
listen 80 reuseport;
server_name localhost;
access_log /var/log/nginx/access.log ;
error_log /var/log/nginx/error.log ;
set $MAGE_ROOT /var/www/magento2;
root $MAGE_ROOT/pub;
## Magento Setup Tool
include conf_m2/setup.conf;
# Deny all internal locations also default phpmyadmin
location ~ ^/(app|bin|var|tmp|phpserver|vendor|magento_version|php[mM]y[aA]dmin|pma)/? { deny all; }
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
## Static location
include conf_m2/assets.conf;
location @static { rewrite /static/(versiond*/)?(.*)$ /static.php?resource=$2 last; }
location @media { try_files $uri $uri/ /get.php$is_args$args; }
## Process php files (strict rule, define files to be executed)
location ~ (index|health_check|get|static|report|404|503).php$ {
try_files $uri =404;
include conf_m2/php_backend.conf;
fastcgi_cache microcache;
fastcgi_cache_key $scheme|$host|search|$arg_q;
fastcgi_cache_valid 200 301 302 2h;
fastcgi_cache_use_stale updating error timeout invalid_header http_500;
fastcgi_pass_header Set-Cookie;
fastcgi_pass_header Cookie;
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
}
###Here is the directory I want to installed another magento 2, but it now works
rewrite ^/test /test/$1 permanent;
location /test {
try_files $uri /$uri/index.php?$args;
index index.php index.html index.htm;
}
rewrite ^/test/admin /test/admin/$1 permanent;
}
magento2 installation
bumped to the homepage by Community♦ 9 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
how did u resolve this ?
– Sarasranglt
Jan 28 at 19:33
add a comment |
I am installing Magento 2 into a subdirectory beside the main installation. I would like to configure the subdirectory named "test". However, when I try to access localhost/test to enter the setup page, it just tells:
localhost redirected you too many times. Try clearing your cookies. ERR_TOO_MANY_REDIRECTS.
Here is my NGINX config :
server {
listen 80 reuseport;
server_name localhost;
access_log /var/log/nginx/access.log ;
error_log /var/log/nginx/error.log ;
set $MAGE_ROOT /var/www/magento2;
root $MAGE_ROOT/pub;
## Magento Setup Tool
include conf_m2/setup.conf;
# Deny all internal locations also default phpmyadmin
location ~ ^/(app|bin|var|tmp|phpserver|vendor|magento_version|php[mM]y[aA]dmin|pma)/? { deny all; }
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
## Static location
include conf_m2/assets.conf;
location @static { rewrite /static/(versiond*/)?(.*)$ /static.php?resource=$2 last; }
location @media { try_files $uri $uri/ /get.php$is_args$args; }
## Process php files (strict rule, define files to be executed)
location ~ (index|health_check|get|static|report|404|503).php$ {
try_files $uri =404;
include conf_m2/php_backend.conf;
fastcgi_cache microcache;
fastcgi_cache_key $scheme|$host|search|$arg_q;
fastcgi_cache_valid 200 301 302 2h;
fastcgi_cache_use_stale updating error timeout invalid_header http_500;
fastcgi_pass_header Set-Cookie;
fastcgi_pass_header Cookie;
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
}
###Here is the directory I want to installed another magento 2, but it now works
rewrite ^/test /test/$1 permanent;
location /test {
try_files $uri /$uri/index.php?$args;
index index.php index.html index.htm;
}
rewrite ^/test/admin /test/admin/$1 permanent;
}
magento2 installation
I am installing Magento 2 into a subdirectory beside the main installation. I would like to configure the subdirectory named "test". However, when I try to access localhost/test to enter the setup page, it just tells:
localhost redirected you too many times. Try clearing your cookies. ERR_TOO_MANY_REDIRECTS.
Here is my NGINX config :
server {
listen 80 reuseport;
server_name localhost;
access_log /var/log/nginx/access.log ;
error_log /var/log/nginx/error.log ;
set $MAGE_ROOT /var/www/magento2;
root $MAGE_ROOT/pub;
## Magento Setup Tool
include conf_m2/setup.conf;
# Deny all internal locations also default phpmyadmin
location ~ ^/(app|bin|var|tmp|phpserver|vendor|magento_version|php[mM]y[aA]dmin|pma)/? { deny all; }
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
## Static location
include conf_m2/assets.conf;
location @static { rewrite /static/(versiond*/)?(.*)$ /static.php?resource=$2 last; }
location @media { try_files $uri $uri/ /get.php$is_args$args; }
## Process php files (strict rule, define files to be executed)
location ~ (index|health_check|get|static|report|404|503).php$ {
try_files $uri =404;
include conf_m2/php_backend.conf;
fastcgi_cache microcache;
fastcgi_cache_key $scheme|$host|search|$arg_q;
fastcgi_cache_valid 200 301 302 2h;
fastcgi_cache_use_stale updating error timeout invalid_header http_500;
fastcgi_pass_header Set-Cookie;
fastcgi_pass_header Cookie;
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
}
###Here is the directory I want to installed another magento 2, but it now works
rewrite ^/test /test/$1 permanent;
location /test {
try_files $uri /$uri/index.php?$args;
index index.php index.html index.htm;
}
rewrite ^/test/admin /test/admin/$1 permanent;
}
magento2 installation
magento2 installation
edited Jan 3 '18 at 7:57
Nisse Engström
42355
42355
asked Jan 1 '18 at 6:50
want_to_be_calmwant_to_be_calm
101
101
bumped to the homepage by Community♦ 9 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 9 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
how did u resolve this ?
– Sarasranglt
Jan 28 at 19:33
add a comment |
how did u resolve this ?
– Sarasranglt
Jan 28 at 19:33
how did u resolve this ?
– Sarasranglt
Jan 28 at 19:33
how did u resolve this ?
– Sarasranglt
Jan 28 at 19:33
add a comment |
1 Answer
1
active
oldest
votes
I'm no nginx expert but this
rewrite ^/test /test/$1 permanent;
suspiciously looks like an endless loop.
Why are you doing this? Just create a subdirectory in /var/www/
like /var/www/test
and install Magento there.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f207671%2fmagento-2-install-to-subfolder-problem%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I'm no nginx expert but this
rewrite ^/test /test/$1 permanent;
suspiciously looks like an endless loop.
Why are you doing this? Just create a subdirectory in /var/www/
like /var/www/test
and install Magento there.
add a comment |
I'm no nginx expert but this
rewrite ^/test /test/$1 permanent;
suspiciously looks like an endless loop.
Why are you doing this? Just create a subdirectory in /var/www/
like /var/www/test
and install Magento there.
add a comment |
I'm no nginx expert but this
rewrite ^/test /test/$1 permanent;
suspiciously looks like an endless loop.
Why are you doing this? Just create a subdirectory in /var/www/
like /var/www/test
and install Magento there.
I'm no nginx expert but this
rewrite ^/test /test/$1 permanent;
suspiciously looks like an endless loop.
Why are you doing this? Just create a subdirectory in /var/www/
like /var/www/test
and install Magento there.
edited Jan 3 '18 at 9:21
answered Jan 3 '18 at 9:15
sterossteros
827629
827629
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f207671%2fmagento-2-install-to-subfolder-problem%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
how did u resolve this ?
– Sarasranglt
Jan 28 at 19:33