2 Replies - 562 Views - Last Post: 07 October 2011 - 11:59 AM

Topic Sponsor:

#1 amgenhammer  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 5
  • Joined: 26-July 08

APACHE2 Port Issue

Posted 07 October 2011 - 11:19 AM

Hi!
I'm having a bit of an issue with my server. Here is my /etc/apache2/ports.conf file:

NameVirtualHost 192.168.1.124:80
Listen 80

<IfModule mod_ssl.c>
# If you add NameVirtualHost *:443 here, you will also have to change
# the VirtualHost statement in /etc/apache2/sites-available/default-ssl
# to <VirtualHost *:443>
# Server Name Indication for SSL named virtual hosts is currently not
# supported by MSIE on Windows XP.
Listen 443
</IfModule>

<IfModule mod_gnutls.c>
Listen 443
</IfModule>


When I attempt to connect to the server (which, is located locally on my network) by typing in it's ip address in my browser (192.168.1.124), it works fine! However, my ISP blocks port 80, and I am trying to set my server up so that people can connect to my website from outside of my network. So, I attempted to change the NameVirtualHost and listen ports to 5000. Now, I get the following error when connecting to 192.168.1.124:5000

Not Found

The requested URL / was not found on this server.
Apache/2.2.14 (Ubuntu) Server at 192.168.1.124 Port 81

I feel like there must be some step that I am missing. Obviously, apache generated that message. Why is it that it works on port 80 and not on a respecified port? Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: APACHE2 Port Issue

#2 amgenhammer  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 5
  • Joined: 26-July 08

Re: APACHE2 Port Issue

Posted 07 October 2011 - 11:31 AM

FOUND SOLUTION:

For anyone else who may be having this issue...


IP:80 - Works || internal & external
IP:8080 - internal works || 404 Error external

My fix,
Code:

sudo gedit /etc/apache2/sites-available/default

In default make a second copy of <VirtualHost *:80> ~~~~ </VirtualHost>
On the second copy Change <VirtualHost *:80> to <VirtualHost *:8080>
Save and Exit.
Code:

sudo /etc/init.d/apache2 restart

IP:80 - Works || internal & external
IP:8080 - Works || internal & external
Was This Post Helpful? 1
  • +
  • -

#3 no2pencil  Icon User is online

  • 2 girls, 1 club
  • member icon

Reputation: 3039
  • View blog
  • Posts: 22,948
  • Joined: 10-May 07

Re: APACHE2 Port Issue

Posted 07 October 2011 - 11:59 AM

Thank you for sharing your solution. I did something similar to this with our webmail server, as it's an entirely different box. webmail.akroncdnr.com answers on port 80 & apache forwards this to an internal server on port 8080. Vhosts on Apahce is a lot of fun, imo.

I'm going to remove the ports all together with nginx on our next server upgrade ;)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1