Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: LAMP make website public

  1. #1
    Join Date
    Jul 2008
    Beans
    36

    Talking LAMP make website public

    Hello all,
    As the title describes i am trying to make my website public from a LAMP setup.
    I trying but i am failing... so if you could give that extra push it would be much appreciated!
    My setup:
    -VMWARE 9.0.2
    -Ubuntu server 12.10
    -apache2 (2.2 i think?)
    -php5
    -mysql
    -phpmyadmin

    Standard stuff i guess. So where am i?
    My website is accessible from LAN connections in http://192.168.1.147/test.php where i have the phpinfo() function and in http://192.168.1.147/ i have the it works!

    I set up port forwarding on the router on port :80 with the VM's local ip address checked if the port is on (OK).

    Now i was thinking next step is to change the ports.conf file?
    FROM:
    NameVirtualHost *:80
    List *:80
    <ifModule mod_ssl.c>
    Listen 443
    </ifModule>

    <ifModule mod_gnutls.c>
    listen 443
    </ifModule>
    TO:
    NameVirtualHost My.IP.Add.ress:80
    List My.IP.Add.ress:80
    <ifModule mod_ssl.c>
    Listen 443
    </ifModule>

    <ifModule mod_gnutls.c>
    listen 443
    </ifModule>
    but then i should change the virtual host file of the /etc/apache2/sites-available/default to use the same IP and port right? thats when i get the following (after i restart or try to restart apache)

    [Date] [error] (EAI 2) name or service unknown: failed to resolve server name for (check dns) or etc..
    And then (99)Cannot assign requested address: make_sock: could not bind to address 1.2.3.4 no listening sockets available shutting down.

    I have put my internet ip address not the local ip.

    Thats my stop
    Thanks even for reading!

  2. #2
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    12,901
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: LAMP make website public

    No, leave the ports.conf file as it is. The router port forwarding will take care to forward all traffic incoming on port 80 of the public IP to the server private IP.

    Your ISP might be blocking port 80 to prevent running services. Otherwise, if you browse the public IP you should see the It Works page.

    Go to a website that checks ports from any computer in your network, and check the port 80. Something like: http://www.canyouseeme.org/

    See if it says your port 80 is open.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

  3. #3
    Join Date
    Jul 2008
    Beans
    36

    Re: LAMP make website public

    the port is open as the site suggests.
    i changed the port.conf to *:80 and the /etc/apache2/sites-available/default --> to <VirtualHost *:80>
    but when i access my ipaddress:80 i get "Server requires username and password. the server says level_15_access

    P.S ofc restarted apache
    Last edited by drakoumel; April 25th, 2013 at 09:51 PM.

  4. #4
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    12,901
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: LAMP make website public

    Something got messed up. Do you have a VM image with the basic setup? You can simply restore it and not waste time repairing this.

    Apache was working fine and the site was opening from the LAN. You need to reach that point again.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

  5. #5
    Join Date
    Jul 2008
    Beans
    36

    Re: LAMP make website public

    i can still reach it in a LAN using http://192.168.1.147/ but when i try with 62.254.165.178 i get the access errors

  6. #6
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: LAMP make website public

    The router is probably forwarding it's web admin page to the internet. That would explain the username/password prompt.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  7. #7
    Join Date
    Jul 2008
    Beans
    36

    Re: LAMP make website public

    if thats the case any ideas? also if it would point to its admin page wouldn't the same username/pass i use for 192.168.1.1 be valid? (i tried got a 401)

  8. #8
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: LAMP make website public

    Quote Originally Posted by drakoumel View Post
    if thats the case any ideas? also if it would point to its admin page wouldn't the same username/pass i use for 192.168.1.1 be valid? (i tried got a 401)
    Hmmm...

    If you try to access it via your external IP from a different network (phone, starbucks, etc), what happens?
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  9. #9
    Join Date
    Jul 2008
    Beans
    36

    Re: LAMP make website public

    from phone (on 3g) same thing

  10. #10
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: LAMP make website public

    Check the apache logs to see if you are actually hitting the web server.

    Code:
    tail /var/log/apache2/access.log
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •