How do I find the cause of an unwanted redirect by Nginx?In Nginx, how can I rewrite all http requests to...
How to find if SQL server backup is encrypted with TDE without restoring the backup
Rotate ASCII Art by 45 Degrees
Can I hook these wires up to find the connection to a dead outlet?
Why do I get negative height?
Why was Sir Cadogan fired?
Machine learning testing data
How can saying a song's name be a copyright violation?
Why is it a bad idea to hire a hitman to eliminate most corrupt politicians?
What exactly is ineptocracy?
Are British MPs missing the point, with these 'Indicative Votes'?
How obscure is the use of 令 in 令和?
Why is the sentence "Das ist eine Nase" correct?
Different meanings of こわい
My ex-girlfriend uses my Apple ID to log in to her iPad. Do I have to give her my Apple ID password to reset it?
Placement of More Information/Help Icon button for Radio Buttons
How does a dynamic QR code work?
How can I prove that a state of equilibrium is unstable?
How to coordinate airplane tickets?
What is the opposite of "eschatology"?
GFCI outlets - can they be repaired? Are they really needed at the end of a circuit?
What is required to make GPS signals available indoors?
In Bayesian inference, why are some terms dropped from the posterior predictive?
Knowledge-based authentication using Domain-driven Design in C#
Finitely generated matrix groups whose eigenvalues are all algebraic
How do I find the cause of an unwanted redirect by Nginx?
In Nginx, how can I rewrite all http requests to https while maintaining sub-domain?Blank Page: wordpress on nginx+php-fpmNGINX don't parse .php5 as .phpLaravel 4.1 on nginx routes error 404301 redirect DNS issuesNginX + WordPress + SSL + non-www + W3TC vhost config file questionsnginx PHP files downloading instead of executingCodeIgniter nginx rewrite rules for i8ln URL'sWhy Nginx calls for invalid certificate in non-existent subdomains just to redirect to 404?NGINX virtual host config for Magento2 in a subfolder
I'm using nginx as my server. I have two domain names abc.com and xyz.com. Somehow I have configured abc.com to go to xyz.com but I cannot find where. I have a file under sites-enabled for each domain but the redirect is not there. I also checked nginx.conf and didn't see any redirects. Where can this redirect be coming from? Interesting thing is that when I remove abc.com server file from sites-enabled, I get the 404 error. The server file in sites-enabled looks something like:
server {
server_name www.abc.com default_server;
root /var/www/dev;
index index.php;
location / {
try_files $uri $uri/ @handler;
}
location @handler {
rewrite / /index.php;
}
location ^~ /html {
try_files $uri $uri/;
}
Where can i check to find the cause of this unwanted redirect?
nginx domain-name-system domain redirect http
add a comment |
I'm using nginx as my server. I have two domain names abc.com and xyz.com. Somehow I have configured abc.com to go to xyz.com but I cannot find where. I have a file under sites-enabled for each domain but the redirect is not there. I also checked nginx.conf and didn't see any redirects. Where can this redirect be coming from? Interesting thing is that when I remove abc.com server file from sites-enabled, I get the 404 error. The server file in sites-enabled looks something like:
server {
server_name www.abc.com default_server;
root /var/www/dev;
index index.php;
location / {
try_files $uri $uri/ @handler;
}
location @handler {
rewrite / /index.php;
}
location ^~ /html {
try_files $uri $uri/;
}
Where can i check to find the cause of this unwanted redirect?
nginx domain-name-system domain redirect http
I don't see any redirect there, nor do I see any way to handle PHP. You can only serve static files, and your PHP source code will be exposed. So that configuration doesn't make sense. Please post your real configuration, and include every server block, and do not remove information.
– Michael Hampton♦
1 min ago
add a comment |
I'm using nginx as my server. I have two domain names abc.com and xyz.com. Somehow I have configured abc.com to go to xyz.com but I cannot find where. I have a file under sites-enabled for each domain but the redirect is not there. I also checked nginx.conf and didn't see any redirects. Where can this redirect be coming from? Interesting thing is that when I remove abc.com server file from sites-enabled, I get the 404 error. The server file in sites-enabled looks something like:
server {
server_name www.abc.com default_server;
root /var/www/dev;
index index.php;
location / {
try_files $uri $uri/ @handler;
}
location @handler {
rewrite / /index.php;
}
location ^~ /html {
try_files $uri $uri/;
}
Where can i check to find the cause of this unwanted redirect?
nginx domain-name-system domain redirect http
I'm using nginx as my server. I have two domain names abc.com and xyz.com. Somehow I have configured abc.com to go to xyz.com but I cannot find where. I have a file under sites-enabled for each domain but the redirect is not there. I also checked nginx.conf and didn't see any redirects. Where can this redirect be coming from? Interesting thing is that when I remove abc.com server file from sites-enabled, I get the 404 error. The server file in sites-enabled looks something like:
server {
server_name www.abc.com default_server;
root /var/www/dev;
index index.php;
location / {
try_files $uri $uri/ @handler;
}
location @handler {
rewrite / /index.php;
}
location ^~ /html {
try_files $uri $uri/;
}
Where can i check to find the cause of this unwanted redirect?
nginx domain-name-system domain redirect http
nginx domain-name-system domain redirect http
edited 3 mins ago
Jorjani
asked 12 mins ago
JorjaniJorjani
1087
1087
I don't see any redirect there, nor do I see any way to handle PHP. You can only serve static files, and your PHP source code will be exposed. So that configuration doesn't make sense. Please post your real configuration, and include every server block, and do not remove information.
– Michael Hampton♦
1 min ago
add a comment |
I don't see any redirect there, nor do I see any way to handle PHP. You can only serve static files, and your PHP source code will be exposed. So that configuration doesn't make sense. Please post your real configuration, and include every server block, and do not remove information.
– Michael Hampton♦
1 min ago
I don't see any redirect there, nor do I see any way to handle PHP. You can only serve static files, and your PHP source code will be exposed. So that configuration doesn't make sense. Please post your real configuration, and include every server block, and do not remove information.
– Michael Hampton♦
1 min ago
I don't see any redirect there, nor do I see any way to handle PHP. You can only serve static files, and your PHP source code will be exposed. So that configuration doesn't make sense. Please post your real configuration, and include every server block, and do not remove information.
– Michael Hampton♦
1 min ago
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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%2fserverfault.com%2fquestions%2f961218%2fhow-do-i-find-the-cause-of-an-unwanted-redirect-by-nginx%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Server Fault!
- 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%2fserverfault.com%2fquestions%2f961218%2fhow-do-i-find-the-cause-of-an-unwanted-redirect-by-nginx%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
I don't see any redirect there, nor do I see any way to handle PHP. You can only serve static files, and your PHP source code will be exposed. So that configuration doesn't make sense. Please post your real configuration, and include every server block, and do not remove information.
– Michael Hampton♦
1 min ago