Binding a particular IP to a port in apache2











up vote
1
down vote

favorite












In How to set-up a online SVN server on my laptop I asked to give access to my SVN server installed on my laptop to some of my friends siting in another part of country.I set-up a SVN server.I was able to access it locally but my friend wasn't.



So i searched on Google and get to conclusion that i have to bind port 80 to my public IP so that when ever any request come to my public IP , it is redirected to port 80 which in turn is used by process apache2.(This is what i understand after search, kindly correct me if i am wrong.)



But when I did port binding following a link I got following error when I restart my apache2 server.



service apache2 restart 
* Restarting web server apache2 [Mon May 20 13:44:25 2013] [warn] NameVirtualHost *:80 has no VirtualHosts
[Mon May 20 13:44:25 2013] [warn] NameVirtualHost *:80 has no VirtualHosts
(99)Cannot assign requested address: make_sock: could not bind to address xyz.pqr.ad.ef:8010
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.


where xyz.pqr.ad.ef is my public IP and I added one more port 8010.



Need to resolve this error and get my SVN repo online for some specific users.










share|improve this question
























  • What does the Listen directive in your httpd.conf look like?
    – Jenny D
    May 20 '13 at 9:55










  • @JennyD: It is basically empty.it reside inside /etc/apache2/. I had seen some sample httpd.conf files, they basically are not empty, so is it is what i am lacking.
    – shailendra
    May 20 '13 at 10:36












  • @JennyD: Well i read on the link that httpd.conf is basically blank by default in apache2 in ubuntu 12.04.
    – shailendra
    May 20 '13 at 10:43










  • Is the public IP address assigned to any of the interfaces on the system?
    – Ignacio Vazquez-Abrams
    May 20 '13 at 11:45










  • @IgnacioVazquez-Abrams: No, i did sockstat -l and found that public IP is nopt assigned to any other interface
    – shailendra
    May 20 '13 at 11:50

















up vote
1
down vote

favorite












In How to set-up a online SVN server on my laptop I asked to give access to my SVN server installed on my laptop to some of my friends siting in another part of country.I set-up a SVN server.I was able to access it locally but my friend wasn't.



So i searched on Google and get to conclusion that i have to bind port 80 to my public IP so that when ever any request come to my public IP , it is redirected to port 80 which in turn is used by process apache2.(This is what i understand after search, kindly correct me if i am wrong.)



But when I did port binding following a link I got following error when I restart my apache2 server.



service apache2 restart 
* Restarting web server apache2 [Mon May 20 13:44:25 2013] [warn] NameVirtualHost *:80 has no VirtualHosts
[Mon May 20 13:44:25 2013] [warn] NameVirtualHost *:80 has no VirtualHosts
(99)Cannot assign requested address: make_sock: could not bind to address xyz.pqr.ad.ef:8010
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.


where xyz.pqr.ad.ef is my public IP and I added one more port 8010.



Need to resolve this error and get my SVN repo online for some specific users.










share|improve this question
























  • What does the Listen directive in your httpd.conf look like?
    – Jenny D
    May 20 '13 at 9:55










  • @JennyD: It is basically empty.it reside inside /etc/apache2/. I had seen some sample httpd.conf files, they basically are not empty, so is it is what i am lacking.
    – shailendra
    May 20 '13 at 10:36












  • @JennyD: Well i read on the link that httpd.conf is basically blank by default in apache2 in ubuntu 12.04.
    – shailendra
    May 20 '13 at 10:43










  • Is the public IP address assigned to any of the interfaces on the system?
    – Ignacio Vazquez-Abrams
    May 20 '13 at 11:45










  • @IgnacioVazquez-Abrams: No, i did sockstat -l and found that public IP is nopt assigned to any other interface
    – shailendra
    May 20 '13 at 11:50















up vote
1
down vote

favorite









up vote
1
down vote

favorite











In How to set-up a online SVN server on my laptop I asked to give access to my SVN server installed on my laptop to some of my friends siting in another part of country.I set-up a SVN server.I was able to access it locally but my friend wasn't.



So i searched on Google and get to conclusion that i have to bind port 80 to my public IP so that when ever any request come to my public IP , it is redirected to port 80 which in turn is used by process apache2.(This is what i understand after search, kindly correct me if i am wrong.)



But when I did port binding following a link I got following error when I restart my apache2 server.



service apache2 restart 
* Restarting web server apache2 [Mon May 20 13:44:25 2013] [warn] NameVirtualHost *:80 has no VirtualHosts
[Mon May 20 13:44:25 2013] [warn] NameVirtualHost *:80 has no VirtualHosts
(99)Cannot assign requested address: make_sock: could not bind to address xyz.pqr.ad.ef:8010
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.


where xyz.pqr.ad.ef is my public IP and I added one more port 8010.



Need to resolve this error and get my SVN repo online for some specific users.










share|improve this question















In How to set-up a online SVN server on my laptop I asked to give access to my SVN server installed on my laptop to some of my friends siting in another part of country.I set-up a SVN server.I was able to access it locally but my friend wasn't.



So i searched on Google and get to conclusion that i have to bind port 80 to my public IP so that when ever any request come to my public IP , it is redirected to port 80 which in turn is used by process apache2.(This is what i understand after search, kindly correct me if i am wrong.)



But when I did port binding following a link I got following error when I restart my apache2 server.



service apache2 restart 
* Restarting web server apache2 [Mon May 20 13:44:25 2013] [warn] NameVirtualHost *:80 has no VirtualHosts
[Mon May 20 13:44:25 2013] [warn] NameVirtualHost *:80 has no VirtualHosts
(99)Cannot assign requested address: make_sock: could not bind to address xyz.pqr.ad.ef:8010
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.


where xyz.pqr.ad.ef is my public IP and I added one more port 8010.



Need to resolve this error and get my SVN repo online for some specific users.







ubuntu apache-httpd subversion






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 18 at 6:54









Rui F Ribeiro

38.2k1475123




38.2k1475123










asked May 20 '13 at 8:27









shailendra

5110




5110












  • What does the Listen directive in your httpd.conf look like?
    – Jenny D
    May 20 '13 at 9:55










  • @JennyD: It is basically empty.it reside inside /etc/apache2/. I had seen some sample httpd.conf files, they basically are not empty, so is it is what i am lacking.
    – shailendra
    May 20 '13 at 10:36












  • @JennyD: Well i read on the link that httpd.conf is basically blank by default in apache2 in ubuntu 12.04.
    – shailendra
    May 20 '13 at 10:43










  • Is the public IP address assigned to any of the interfaces on the system?
    – Ignacio Vazquez-Abrams
    May 20 '13 at 11:45










  • @IgnacioVazquez-Abrams: No, i did sockstat -l and found that public IP is nopt assigned to any other interface
    – shailendra
    May 20 '13 at 11:50




















  • What does the Listen directive in your httpd.conf look like?
    – Jenny D
    May 20 '13 at 9:55










  • @JennyD: It is basically empty.it reside inside /etc/apache2/. I had seen some sample httpd.conf files, they basically are not empty, so is it is what i am lacking.
    – shailendra
    May 20 '13 at 10:36












  • @JennyD: Well i read on the link that httpd.conf is basically blank by default in apache2 in ubuntu 12.04.
    – shailendra
    May 20 '13 at 10:43










  • Is the public IP address assigned to any of the interfaces on the system?
    – Ignacio Vazquez-Abrams
    May 20 '13 at 11:45










  • @IgnacioVazquez-Abrams: No, i did sockstat -l and found that public IP is nopt assigned to any other interface
    – shailendra
    May 20 '13 at 11:50


















What does the Listen directive in your httpd.conf look like?
– Jenny D
May 20 '13 at 9:55




What does the Listen directive in your httpd.conf look like?
– Jenny D
May 20 '13 at 9:55












@JennyD: It is basically empty.it reside inside /etc/apache2/. I had seen some sample httpd.conf files, they basically are not empty, so is it is what i am lacking.
– shailendra
May 20 '13 at 10:36






@JennyD: It is basically empty.it reside inside /etc/apache2/. I had seen some sample httpd.conf files, they basically are not empty, so is it is what i am lacking.
– shailendra
May 20 '13 at 10:36














@JennyD: Well i read on the link that httpd.conf is basically blank by default in apache2 in ubuntu 12.04.
– shailendra
May 20 '13 at 10:43




@JennyD: Well i read on the link that httpd.conf is basically blank by default in apache2 in ubuntu 12.04.
– shailendra
May 20 '13 at 10:43












Is the public IP address assigned to any of the interfaces on the system?
– Ignacio Vazquez-Abrams
May 20 '13 at 11:45




Is the public IP address assigned to any of the interfaces on the system?
– Ignacio Vazquez-Abrams
May 20 '13 at 11:45












@IgnacioVazquez-Abrams: No, i did sockstat -l and found that public IP is nopt assigned to any other interface
– shailendra
May 20 '13 at 11:50






@IgnacioVazquez-Abrams: No, i did sockstat -l and found that public IP is nopt assigned to any other interface
– shailendra
May 20 '13 at 11:50












1 Answer
1






active

oldest

votes

















up vote
2
down vote













Your issue above is because you've specified this in your httpd.conf file:



NameVirtualHost *:80


But then you don't specify any VirtualHost sections like this:



<VirtualHost *:80>
UseCanonicalName off

ServerName localhost

# subversion lines go in here
</VirtualHost>





share|improve this answer





















  • my httpd.conf file is empty.
    – shailendra
    May 20 '13 at 12:07






  • 1




    Look at the files under /etc/httpd. What's the underlying Linux distro? There are differences b/w Debian based and Red Hat vs. others. Again another reason to avoid this if you don't know about it 8-).
    – slm
    May 20 '13 at 12:16










  • i am using ubuntu-12.04 and there is no etc/httpd.I will try establishing only SVN following your link and then see whether i am able to do svn co or not from a remote machine
    – shailendra
    May 20 '13 at 12:41








  • 1




    Look under /et/apache2. Ubuntu uses a apache2.conf instead of httpd.conf for example, and there may be additional files under /etc/apache2/conf.d. Where were you making your subversion changes to get apache working if you weren't in these directories?
    – slm
    May 20 '13 at 13:51











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',
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
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f76433%2fbinding-a-particular-ip-to-a-port-in-apache2%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








up vote
2
down vote













Your issue above is because you've specified this in your httpd.conf file:



NameVirtualHost *:80


But then you don't specify any VirtualHost sections like this:



<VirtualHost *:80>
UseCanonicalName off

ServerName localhost

# subversion lines go in here
</VirtualHost>





share|improve this answer





















  • my httpd.conf file is empty.
    – shailendra
    May 20 '13 at 12:07






  • 1




    Look at the files under /etc/httpd. What's the underlying Linux distro? There are differences b/w Debian based and Red Hat vs. others. Again another reason to avoid this if you don't know about it 8-).
    – slm
    May 20 '13 at 12:16










  • i am using ubuntu-12.04 and there is no etc/httpd.I will try establishing only SVN following your link and then see whether i am able to do svn co or not from a remote machine
    – shailendra
    May 20 '13 at 12:41








  • 1




    Look under /et/apache2. Ubuntu uses a apache2.conf instead of httpd.conf for example, and there may be additional files under /etc/apache2/conf.d. Where were you making your subversion changes to get apache working if you weren't in these directories?
    – slm
    May 20 '13 at 13:51















up vote
2
down vote













Your issue above is because you've specified this in your httpd.conf file:



NameVirtualHost *:80


But then you don't specify any VirtualHost sections like this:



<VirtualHost *:80>
UseCanonicalName off

ServerName localhost

# subversion lines go in here
</VirtualHost>





share|improve this answer





















  • my httpd.conf file is empty.
    – shailendra
    May 20 '13 at 12:07






  • 1




    Look at the files under /etc/httpd. What's the underlying Linux distro? There are differences b/w Debian based and Red Hat vs. others. Again another reason to avoid this if you don't know about it 8-).
    – slm
    May 20 '13 at 12:16










  • i am using ubuntu-12.04 and there is no etc/httpd.I will try establishing only SVN following your link and then see whether i am able to do svn co or not from a remote machine
    – shailendra
    May 20 '13 at 12:41








  • 1




    Look under /et/apache2. Ubuntu uses a apache2.conf instead of httpd.conf for example, and there may be additional files under /etc/apache2/conf.d. Where were you making your subversion changes to get apache working if you weren't in these directories?
    – slm
    May 20 '13 at 13:51













up vote
2
down vote










up vote
2
down vote









Your issue above is because you've specified this in your httpd.conf file:



NameVirtualHost *:80


But then you don't specify any VirtualHost sections like this:



<VirtualHost *:80>
UseCanonicalName off

ServerName localhost

# subversion lines go in here
</VirtualHost>





share|improve this answer












Your issue above is because you've specified this in your httpd.conf file:



NameVirtualHost *:80


But then you don't specify any VirtualHost sections like this:



<VirtualHost *:80>
UseCanonicalName off

ServerName localhost

# subversion lines go in here
</VirtualHost>






share|improve this answer












share|improve this answer



share|improve this answer










answered May 20 '13 at 12:04









slm

244k66505669




244k66505669












  • my httpd.conf file is empty.
    – shailendra
    May 20 '13 at 12:07






  • 1




    Look at the files under /etc/httpd. What's the underlying Linux distro? There are differences b/w Debian based and Red Hat vs. others. Again another reason to avoid this if you don't know about it 8-).
    – slm
    May 20 '13 at 12:16










  • i am using ubuntu-12.04 and there is no etc/httpd.I will try establishing only SVN following your link and then see whether i am able to do svn co or not from a remote machine
    – shailendra
    May 20 '13 at 12:41








  • 1




    Look under /et/apache2. Ubuntu uses a apache2.conf instead of httpd.conf for example, and there may be additional files under /etc/apache2/conf.d. Where were you making your subversion changes to get apache working if you weren't in these directories?
    – slm
    May 20 '13 at 13:51


















  • my httpd.conf file is empty.
    – shailendra
    May 20 '13 at 12:07






  • 1




    Look at the files under /etc/httpd. What's the underlying Linux distro? There are differences b/w Debian based and Red Hat vs. others. Again another reason to avoid this if you don't know about it 8-).
    – slm
    May 20 '13 at 12:16










  • i am using ubuntu-12.04 and there is no etc/httpd.I will try establishing only SVN following your link and then see whether i am able to do svn co or not from a remote machine
    – shailendra
    May 20 '13 at 12:41








  • 1




    Look under /et/apache2. Ubuntu uses a apache2.conf instead of httpd.conf for example, and there may be additional files under /etc/apache2/conf.d. Where were you making your subversion changes to get apache working if you weren't in these directories?
    – slm
    May 20 '13 at 13:51
















my httpd.conf file is empty.
– shailendra
May 20 '13 at 12:07




my httpd.conf file is empty.
– shailendra
May 20 '13 at 12:07




1




1




Look at the files under /etc/httpd. What's the underlying Linux distro? There are differences b/w Debian based and Red Hat vs. others. Again another reason to avoid this if you don't know about it 8-).
– slm
May 20 '13 at 12:16




Look at the files under /etc/httpd. What's the underlying Linux distro? There are differences b/w Debian based and Red Hat vs. others. Again another reason to avoid this if you don't know about it 8-).
– slm
May 20 '13 at 12:16












i am using ubuntu-12.04 and there is no etc/httpd.I will try establishing only SVN following your link and then see whether i am able to do svn co or not from a remote machine
– shailendra
May 20 '13 at 12:41






i am using ubuntu-12.04 and there is no etc/httpd.I will try establishing only SVN following your link and then see whether i am able to do svn co or not from a remote machine
– shailendra
May 20 '13 at 12:41






1




1




Look under /et/apache2. Ubuntu uses a apache2.conf instead of httpd.conf for example, and there may be additional files under /etc/apache2/conf.d. Where were you making your subversion changes to get apache working if you weren't in these directories?
– slm
May 20 '13 at 13:51




Look under /et/apache2. Ubuntu uses a apache2.conf instead of httpd.conf for example, and there may be additional files under /etc/apache2/conf.d. Where were you making your subversion changes to get apache working if you weren't in these directories?
– slm
May 20 '13 at 13:51


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f76433%2fbinding-a-particular-ip-to-a-port-in-apache2%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Morgemoulin

Scott Moir

Souastre