Redirect port / port 10000 to https apacheApache answer both HTTP and HTTPS on the same portApache2 - mod_expire and mod_rewrite not working in httpd.conf - serving content from tomcatApache redirection issue with httpsapache2 configuration for blog.example.com not workingRedirect non-www ssl traffic to www ssl (apache)Apache2 mod_proxy with gitlab on different serverRedirect apache to http requests to https except for when request is a POST?Virtual hosts with port 80 & 443 not workingapache rewrite rules, non-www, httpsI need help setting up httpd.conf file to perform redirects to same site if accessed via http and httpsHow to configure apache 2.2 to allow acme-challenge and pass all other traffic to AJP/tomcat
The origin of the Russian proverb about two hares
How do we say "within a kilometer radius spherically"?
Possible runaway argument using circuitikz
What would be the way to say "just saying" in German? (Not the literal translation)
Is Lambda Calculus purely syntactic?
Who voices the small round football sized demon In Good Omens
Can we completely replace inheritance using strategy pattern and dependency injection?
2019 gold coins to share
How can one's career as a reviewer be ended?
How to safely destroy (a large quantity of) valid checks?
What would prevent chimeras from reproducing with each other?
tabular: caption and align problem
A word that means "blending into a community too much"
What STL algorithm can determine if exactly one item in a container satisfies a predicate?
Can the removal of a duty-free sales trolley result in a measurable reduction in emissions?
Does the new finding on "reversing a quantum jump mid-flight" rule out any interpretations of QM?
UTC timestamp format for launch vehicles
What is the polarity of this barrel plug with a double circle?
Do people with slow metabolism tend to gain weight (fat) if they stop exercising?
Is using 'echo' to display attacker-controlled data on the terminal dangerous?
How to add arrows in smartdiagram (descriptive diagram)
Russian word for a male zebra
Is it okay to have a sequel start immediately after the end of the first book?
I have a problematic assistant manager, but I can't fire him
Redirect port / port 10000 to https apache
Apache answer both HTTP and HTTPS on the same portApache2 - mod_expire and mod_rewrite not working in httpd.conf - serving content from tomcatApache redirection issue with httpsapache2 configuration for blog.example.com not workingRedirect non-www ssl traffic to www ssl (apache)Apache2 mod_proxy with gitlab on different serverRedirect apache to http requests to https except for when request is a POST?Virtual hosts with port 80 & 443 not workingapache rewrite rules, non-www, httpsI need help setting up httpd.conf file to perform redirects to same site if accessed via http and httpsHow to configure apache 2.2 to allow acme-challenge and pass all other traffic to AJP/tomcat
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I have been reading around and trying different configurations to get a request to my server on port 10000 to redirect a http to a https request.
For some reason I can't figure out how to make it happen when i use port 10000 although i can set a rewrite rule for port 80 (implicit) to do it:
All I want is a request as follows:
http://example.com:10000
to redirect me to
https://example.com:10000
My current, vhost, the last of many different attempts is currently set as follows, but it doesn't seem to work at all:
<VirtualHost *:10000>
RewriteEngine On
RewriteCond %HTTPS off
RewriteRule (.*) https://%HTTP_POST%REQUEST_URI
ErrorLog "/var/log/httpd/webmin-redirect_error_log.log"
CustomLog "/var/log/httpd/webmin-redirect_access_log.log" common
</VirtualHost>
I'v also tried a few other things but nothing seems to work, any help would be appreciated.
EDIT: I already have a re-write in my httpd.conf that redirects port 80 to https.
If I access port 10000 externally it is redirected to https, but from the lan "http://192.168.0.2:10000" it doesnt.
apache-2.2 virtualhost httpd.conf
add a comment |
I have been reading around and trying different configurations to get a request to my server on port 10000 to redirect a http to a https request.
For some reason I can't figure out how to make it happen when i use port 10000 although i can set a rewrite rule for port 80 (implicit) to do it:
All I want is a request as follows:
http://example.com:10000
to redirect me to
https://example.com:10000
My current, vhost, the last of many different attempts is currently set as follows, but it doesn't seem to work at all:
<VirtualHost *:10000>
RewriteEngine On
RewriteCond %HTTPS off
RewriteRule (.*) https://%HTTP_POST%REQUEST_URI
ErrorLog "/var/log/httpd/webmin-redirect_error_log.log"
CustomLog "/var/log/httpd/webmin-redirect_access_log.log" common
</VirtualHost>
I'v also tried a few other things but nothing seems to work, any help would be appreciated.
EDIT: I already have a re-write in my httpd.conf that redirects port 80 to https.
If I access port 10000 externally it is redirected to https, but from the lan "http://192.168.0.2:10000" it doesnt.
apache-2.2 virtualhost httpd.conf
2
Are you trying to redirect requests to Webmin? If I remember correctly, webmin has it's own web server and doesn't use Apache. So inside the LAN, you might be hitting webmin's server and the request never gets to Apache.
– Marie Fischer
Nov 12 '11 at 15:32
Indeed I am trying to do it with webmin, that would make sense, I'll poke around, thanks.
– Hamid
Nov 12 '11 at 15:34
add a comment |
I have been reading around and trying different configurations to get a request to my server on port 10000 to redirect a http to a https request.
For some reason I can't figure out how to make it happen when i use port 10000 although i can set a rewrite rule for port 80 (implicit) to do it:
All I want is a request as follows:
http://example.com:10000
to redirect me to
https://example.com:10000
My current, vhost, the last of many different attempts is currently set as follows, but it doesn't seem to work at all:
<VirtualHost *:10000>
RewriteEngine On
RewriteCond %HTTPS off
RewriteRule (.*) https://%HTTP_POST%REQUEST_URI
ErrorLog "/var/log/httpd/webmin-redirect_error_log.log"
CustomLog "/var/log/httpd/webmin-redirect_access_log.log" common
</VirtualHost>
I'v also tried a few other things but nothing seems to work, any help would be appreciated.
EDIT: I already have a re-write in my httpd.conf that redirects port 80 to https.
If I access port 10000 externally it is redirected to https, but from the lan "http://192.168.0.2:10000" it doesnt.
apache-2.2 virtualhost httpd.conf
I have been reading around and trying different configurations to get a request to my server on port 10000 to redirect a http to a https request.
For some reason I can't figure out how to make it happen when i use port 10000 although i can set a rewrite rule for port 80 (implicit) to do it:
All I want is a request as follows:
http://example.com:10000
to redirect me to
https://example.com:10000
My current, vhost, the last of many different attempts is currently set as follows, but it doesn't seem to work at all:
<VirtualHost *:10000>
RewriteEngine On
RewriteCond %HTTPS off
RewriteRule (.*) https://%HTTP_POST%REQUEST_URI
ErrorLog "/var/log/httpd/webmin-redirect_error_log.log"
CustomLog "/var/log/httpd/webmin-redirect_access_log.log" common
</VirtualHost>
I'v also tried a few other things but nothing seems to work, any help would be appreciated.
EDIT: I already have a re-write in my httpd.conf that redirects port 80 to https.
If I access port 10000 externally it is redirected to https, but from the lan "http://192.168.0.2:10000" it doesnt.
apache-2.2 virtualhost httpd.conf
apache-2.2 virtualhost httpd.conf
edited Nov 12 '11 at 19:41
Mark Henderson♦
61.6k29164248
61.6k29164248
asked Nov 12 '11 at 14:32
HamidHamid
12018
12018
2
Are you trying to redirect requests to Webmin? If I remember correctly, webmin has it's own web server and doesn't use Apache. So inside the LAN, you might be hitting webmin's server and the request never gets to Apache.
– Marie Fischer
Nov 12 '11 at 15:32
Indeed I am trying to do it with webmin, that would make sense, I'll poke around, thanks.
– Hamid
Nov 12 '11 at 15:34
add a comment |
2
Are you trying to redirect requests to Webmin? If I remember correctly, webmin has it's own web server and doesn't use Apache. So inside the LAN, you might be hitting webmin's server and the request never gets to Apache.
– Marie Fischer
Nov 12 '11 at 15:32
Indeed I am trying to do it with webmin, that would make sense, I'll poke around, thanks.
– Hamid
Nov 12 '11 at 15:34
2
2
Are you trying to redirect requests to Webmin? If I remember correctly, webmin has it's own web server and doesn't use Apache. So inside the LAN, you might be hitting webmin's server and the request never gets to Apache.
– Marie Fischer
Nov 12 '11 at 15:32
Are you trying to redirect requests to Webmin? If I remember correctly, webmin has it's own web server and doesn't use Apache. So inside the LAN, you might be hitting webmin's server and the request never gets to Apache.
– Marie Fischer
Nov 12 '11 at 15:32
Indeed I am trying to do it with webmin, that would make sense, I'll poke around, thanks.
– Hamid
Nov 12 '11 at 15:34
Indeed I am trying to do it with webmin, that would make sense, I'll poke around, thanks.
– Hamid
Nov 12 '11 at 15:34
add a comment |
2 Answers
2
active
oldest
votes
You have to decide whether port 10000 is HTTP or HTTPS. For HTTPS you will have to create a virtualhost of it's own with SSL* configuration lines. You cannot have both in the same IP in the same port.
add a comment |
This can be archived by redirecting to a custom "400 - Bad Request" page and modify the redirection with a rewrite rule. In the following example i request
http://test.mydomain.com:27000
and get redirected to
https://test.mydomain.com:27000
with one virtual host.
Code:
ErrorDocument 400 /
RewriteEngine On
RewriteCond %HTTPS off
RewriteRule ^/?(.*) https://%SERVER_NAME:27000/$1 [R,L]
Or you simply redirect directly to the HTTPS version of the page.
Code:
ErrorDocument 400 https://test.mydomain.com:27000
But you will loose the ability to redirect on a real "Bad Request" page.
add a comment |
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%2f330381%2fredirect-port-port-10000-to-https-apache%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You have to decide whether port 10000 is HTTP or HTTPS. For HTTPS you will have to create a virtualhost of it's own with SSL* configuration lines. You cannot have both in the same IP in the same port.
add a comment |
You have to decide whether port 10000 is HTTP or HTTPS. For HTTPS you will have to create a virtualhost of it's own with SSL* configuration lines. You cannot have both in the same IP in the same port.
add a comment |
You have to decide whether port 10000 is HTTP or HTTPS. For HTTPS you will have to create a virtualhost of it's own with SSL* configuration lines. You cannot have both in the same IP in the same port.
You have to decide whether port 10000 is HTTP or HTTPS. For HTTPS you will have to create a virtualhost of it's own with SSL* configuration lines. You cannot have both in the same IP in the same port.
answered Nov 12 '11 at 20:12
Antti Rytsölä Circles ConsultAntti Rytsölä Circles Consult
60648
60648
add a comment |
add a comment |
This can be archived by redirecting to a custom "400 - Bad Request" page and modify the redirection with a rewrite rule. In the following example i request
http://test.mydomain.com:27000
and get redirected to
https://test.mydomain.com:27000
with one virtual host.
Code:
ErrorDocument 400 /
RewriteEngine On
RewriteCond %HTTPS off
RewriteRule ^/?(.*) https://%SERVER_NAME:27000/$1 [R,L]
Or you simply redirect directly to the HTTPS version of the page.
Code:
ErrorDocument 400 https://test.mydomain.com:27000
But you will loose the ability to redirect on a real "Bad Request" page.
add a comment |
This can be archived by redirecting to a custom "400 - Bad Request" page and modify the redirection with a rewrite rule. In the following example i request
http://test.mydomain.com:27000
and get redirected to
https://test.mydomain.com:27000
with one virtual host.
Code:
ErrorDocument 400 /
RewriteEngine On
RewriteCond %HTTPS off
RewriteRule ^/?(.*) https://%SERVER_NAME:27000/$1 [R,L]
Or you simply redirect directly to the HTTPS version of the page.
Code:
ErrorDocument 400 https://test.mydomain.com:27000
But you will loose the ability to redirect on a real "Bad Request" page.
add a comment |
This can be archived by redirecting to a custom "400 - Bad Request" page and modify the redirection with a rewrite rule. In the following example i request
http://test.mydomain.com:27000
and get redirected to
https://test.mydomain.com:27000
with one virtual host.
Code:
ErrorDocument 400 /
RewriteEngine On
RewriteCond %HTTPS off
RewriteRule ^/?(.*) https://%SERVER_NAME:27000/$1 [R,L]
Or you simply redirect directly to the HTTPS version of the page.
Code:
ErrorDocument 400 https://test.mydomain.com:27000
But you will loose the ability to redirect on a real "Bad Request" page.
This can be archived by redirecting to a custom "400 - Bad Request" page and modify the redirection with a rewrite rule. In the following example i request
http://test.mydomain.com:27000
and get redirected to
https://test.mydomain.com:27000
with one virtual host.
Code:
ErrorDocument 400 /
RewriteEngine On
RewriteCond %HTTPS off
RewriteRule ^/?(.*) https://%SERVER_NAME:27000/$1 [R,L]
Or you simply redirect directly to the HTTPS version of the page.
Code:
ErrorDocument 400 https://test.mydomain.com:27000
But you will loose the ability to redirect on a real "Bad Request" page.
edited Oct 11 '18 at 8:20
answered Oct 10 '18 at 13:04
rdXrdX
11
11
add a comment |
add a comment |
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%2f330381%2fredirect-port-port-10000-to-https-apache%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
2
Are you trying to redirect requests to Webmin? If I remember correctly, webmin has it's own web server and doesn't use Apache. So inside the LAN, you might be hitting webmin's server and the request never gets to Apache.
– Marie Fischer
Nov 12 '11 at 15:32
Indeed I am trying to do it with webmin, that would make sense, I'll poke around, thanks.
– Hamid
Nov 12 '11 at 15:34