apache2 server refuses connection
I am having trouble getting my apache2 server on my new dedicated server working. I tried to look at common trouble-causing problems like firewall, listening interfaces, apachectl -t
and apachectl -S
. But everything seems to be OK.
If I try to access the domain from the web browser on a different machine, it says "connection refused". Accessing it in the web browser via IP address works. Only the domain refuses it.
The access_log
and error_log
are also empty. So, no error really thrown. What may I have missed out? Any help or suggestions would be great. I am using openSUSE 42.2 minimal.
apache-httpd opensuse
add a comment |
I am having trouble getting my apache2 server on my new dedicated server working. I tried to look at common trouble-causing problems like firewall, listening interfaces, apachectl -t
and apachectl -S
. But everything seems to be OK.
If I try to access the domain from the web browser on a different machine, it says "connection refused". Accessing it in the web browser via IP address works. Only the domain refuses it.
The access_log
and error_log
are also empty. So, no error really thrown. What may I have missed out? Any help or suggestions would be great. I am using openSUSE 42.2 minimal.
apache-httpd opensuse
Is the web browser on a different machine, or on the one running Apache2? On both systems what IP address does your domain name resolve to; importantly, do they both resolve it to the same thing, and is that thing your expected (public) IP address? What happens if you try to access your web server by that IP address, e.g.http://172.26.27.28/
? Please add the results to your question.
– roaima
Apr 2 '17 at 22:46
@roaima I edited my question. But what do you mean accessing it local on the web browser? This is a dedicated server, so I have no gui installed on it, just ssh access.
– alpham8
Apr 3 '17 at 5:02
Does your domain's DNS resolve properly to the IP address? E.g. does exampledomain.tld -> your.ip.address.? Check withdig A yourdomain.tld
– Kenneth B. Jensen
Apr 3 '17 at 6:33
Well, I changed about five hours before I asked here the DNS entry to a new IP address. But I ping it and it has been resolved to the new IP address. Also git pushing with domain name worked just fine
– alpham8
Apr 3 '17 at 6:41
If access by IP address works but domain name doesn't it's a DNS issue on the client. If the error message from your web browser isn't really "connection refused" please tell us exactly what it is, because that might have further being on the subject (vHosts spring to mind).
– roaima
Apr 3 '17 at 7:54
add a comment |
I am having trouble getting my apache2 server on my new dedicated server working. I tried to look at common trouble-causing problems like firewall, listening interfaces, apachectl -t
and apachectl -S
. But everything seems to be OK.
If I try to access the domain from the web browser on a different machine, it says "connection refused". Accessing it in the web browser via IP address works. Only the domain refuses it.
The access_log
and error_log
are also empty. So, no error really thrown. What may I have missed out? Any help or suggestions would be great. I am using openSUSE 42.2 minimal.
apache-httpd opensuse
I am having trouble getting my apache2 server on my new dedicated server working. I tried to look at common trouble-causing problems like firewall, listening interfaces, apachectl -t
and apachectl -S
. But everything seems to be OK.
If I try to access the domain from the web browser on a different machine, it says "connection refused". Accessing it in the web browser via IP address works. Only the domain refuses it.
The access_log
and error_log
are also empty. So, no error really thrown. What may I have missed out? Any help or suggestions would be great. I am using openSUSE 42.2 minimal.
apache-httpd opensuse
apache-httpd opensuse
edited May 10 '17 at 16:18
G-Man
13.4k93667
13.4k93667
asked Apr 2 '17 at 19:21
alpham8alpham8
36110
36110
Is the web browser on a different machine, or on the one running Apache2? On both systems what IP address does your domain name resolve to; importantly, do they both resolve it to the same thing, and is that thing your expected (public) IP address? What happens if you try to access your web server by that IP address, e.g.http://172.26.27.28/
? Please add the results to your question.
– roaima
Apr 2 '17 at 22:46
@roaima I edited my question. But what do you mean accessing it local on the web browser? This is a dedicated server, so I have no gui installed on it, just ssh access.
– alpham8
Apr 3 '17 at 5:02
Does your domain's DNS resolve properly to the IP address? E.g. does exampledomain.tld -> your.ip.address.? Check withdig A yourdomain.tld
– Kenneth B. Jensen
Apr 3 '17 at 6:33
Well, I changed about five hours before I asked here the DNS entry to a new IP address. But I ping it and it has been resolved to the new IP address. Also git pushing with domain name worked just fine
– alpham8
Apr 3 '17 at 6:41
If access by IP address works but domain name doesn't it's a DNS issue on the client. If the error message from your web browser isn't really "connection refused" please tell us exactly what it is, because that might have further being on the subject (vHosts spring to mind).
– roaima
Apr 3 '17 at 7:54
add a comment |
Is the web browser on a different machine, or on the one running Apache2? On both systems what IP address does your domain name resolve to; importantly, do they both resolve it to the same thing, and is that thing your expected (public) IP address? What happens if you try to access your web server by that IP address, e.g.http://172.26.27.28/
? Please add the results to your question.
– roaima
Apr 2 '17 at 22:46
@roaima I edited my question. But what do you mean accessing it local on the web browser? This is a dedicated server, so I have no gui installed on it, just ssh access.
– alpham8
Apr 3 '17 at 5:02
Does your domain's DNS resolve properly to the IP address? E.g. does exampledomain.tld -> your.ip.address.? Check withdig A yourdomain.tld
– Kenneth B. Jensen
Apr 3 '17 at 6:33
Well, I changed about five hours before I asked here the DNS entry to a new IP address. But I ping it and it has been resolved to the new IP address. Also git pushing with domain name worked just fine
– alpham8
Apr 3 '17 at 6:41
If access by IP address works but domain name doesn't it's a DNS issue on the client. If the error message from your web browser isn't really "connection refused" please tell us exactly what it is, because that might have further being on the subject (vHosts spring to mind).
– roaima
Apr 3 '17 at 7:54
Is the web browser on a different machine, or on the one running Apache2? On both systems what IP address does your domain name resolve to; importantly, do they both resolve it to the same thing, and is that thing your expected (public) IP address? What happens if you try to access your web server by that IP address, e.g.
http://172.26.27.28/
? Please add the results to your question.– roaima
Apr 2 '17 at 22:46
Is the web browser on a different machine, or on the one running Apache2? On both systems what IP address does your domain name resolve to; importantly, do they both resolve it to the same thing, and is that thing your expected (public) IP address? What happens if you try to access your web server by that IP address, e.g.
http://172.26.27.28/
? Please add the results to your question.– roaima
Apr 2 '17 at 22:46
@roaima I edited my question. But what do you mean accessing it local on the web browser? This is a dedicated server, so I have no gui installed on it, just ssh access.
– alpham8
Apr 3 '17 at 5:02
@roaima I edited my question. But what do you mean accessing it local on the web browser? This is a dedicated server, so I have no gui installed on it, just ssh access.
– alpham8
Apr 3 '17 at 5:02
Does your domain's DNS resolve properly to the IP address? E.g. does exampledomain.tld -> your.ip.address.? Check with
dig A yourdomain.tld
– Kenneth B. Jensen
Apr 3 '17 at 6:33
Does your domain's DNS resolve properly to the IP address? E.g. does exampledomain.tld -> your.ip.address.? Check with
dig A yourdomain.tld
– Kenneth B. Jensen
Apr 3 '17 at 6:33
Well, I changed about five hours before I asked here the DNS entry to a new IP address. But I ping it and it has been resolved to the new IP address. Also git pushing with domain name worked just fine
– alpham8
Apr 3 '17 at 6:41
Well, I changed about five hours before I asked here the DNS entry to a new IP address. But I ping it and it has been resolved to the new IP address. Also git pushing with domain name worked just fine
– alpham8
Apr 3 '17 at 6:41
If access by IP address works but domain name doesn't it's a DNS issue on the client. If the error message from your web browser isn't really "connection refused" please tell us exactly what it is, because that might have further being on the subject (vHosts spring to mind).
– roaima
Apr 3 '17 at 7:54
If access by IP address works but domain name doesn't it's a DNS issue on the client. If the error message from your web browser isn't really "connection refused" please tell us exactly what it is, because that might have further being on the subject (vHosts spring to mind).
– roaima
Apr 3 '17 at 7:54
add a comment |
1 Answer
1
active
oldest
votes
Use the following command to check whether Apache is listening to the port:
netstat -lntp | grep ':(the port you are expecting, e.g., :80)'If nothing is listening to the port, then start apache.
I checked this already. The server is listening on all interfaces.
– alpham8
Apr 3 '17 at 7:56
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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%2funix.stackexchange.com%2fquestions%2f355479%2fapache2-server-refuses-connection%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
Use the following command to check whether Apache is listening to the port:
netstat -lntp | grep ':(the port you are expecting, e.g., :80)'If nothing is listening to the port, then start apache.
I checked this already. The server is listening on all interfaces.
– alpham8
Apr 3 '17 at 7:56
add a comment |
Use the following command to check whether Apache is listening to the port:
netstat -lntp | grep ':(the port you are expecting, e.g., :80)'If nothing is listening to the port, then start apache.
I checked this already. The server is listening on all interfaces.
– alpham8
Apr 3 '17 at 7:56
add a comment |
Use the following command to check whether Apache is listening to the port:
netstat -lntp | grep ':(the port you are expecting, e.g., :80)'If nothing is listening to the port, then start apache.
Use the following command to check whether Apache is listening to the port:
netstat -lntp | grep ':(the port you are expecting, e.g., :80)'If nothing is listening to the port, then start apache.
edited May 10 '17 at 16:41
G-Man
13.4k93667
13.4k93667
answered Apr 3 '17 at 6:21
TechnoTechno
111
111
I checked this already. The server is listening on all interfaces.
– alpham8
Apr 3 '17 at 7:56
add a comment |
I checked this already. The server is listening on all interfaces.
– alpham8
Apr 3 '17 at 7:56
I checked this already. The server is listening on all interfaces.
– alpham8
Apr 3 '17 at 7:56
I checked this already. The server is listening on all interfaces.
– alpham8
Apr 3 '17 at 7:56
add a comment |
Thanks for contributing an answer to Unix & Linux 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%2funix.stackexchange.com%2fquestions%2f355479%2fapache2-server-refuses-connection%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
Is the web browser on a different machine, or on the one running Apache2? On both systems what IP address does your domain name resolve to; importantly, do they both resolve it to the same thing, and is that thing your expected (public) IP address? What happens if you try to access your web server by that IP address, e.g.
http://172.26.27.28/
? Please add the results to your question.– roaima
Apr 2 '17 at 22:46
@roaima I edited my question. But what do you mean accessing it local on the web browser? This is a dedicated server, so I have no gui installed on it, just ssh access.
– alpham8
Apr 3 '17 at 5:02
Does your domain's DNS resolve properly to the IP address? E.g. does exampledomain.tld -> your.ip.address.? Check with
dig A yourdomain.tld
– Kenneth B. Jensen
Apr 3 '17 at 6:33
Well, I changed about five hours before I asked here the DNS entry to a new IP address. But I ping it and it has been resolved to the new IP address. Also git pushing with domain name worked just fine
– alpham8
Apr 3 '17 at 6:41
If access by IP address works but domain name doesn't it's a DNS issue on the client. If the error message from your web browser isn't really "connection refused" please tell us exactly what it is, because that might have further being on the subject (vHosts spring to mind).
– roaima
Apr 3 '17 at 7:54