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.
ubuntu apache-httpd subversion
|
show 5 more comments
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.
ubuntu apache-httpd subversion
What does theListen
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
|
show 5 more comments
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.
ubuntu apache-httpd subversion
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
ubuntu apache-httpd subversion
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 theListen
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
|
show 5 more comments
What does theListen
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
|
show 5 more comments
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>
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 aapache2.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
add a comment |
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>
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 aapache2.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
add a comment |
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>
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 aapache2.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
add a comment |
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>
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>
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 aapache2.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
add a comment |
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 aapache2.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
add a comment |
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%2f76433%2fbinding-a-particular-ip-to-a-port-in-apache2%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
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