1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Can anybody guide me through installation of 2nd Apache

Discussion in 'Apache' started by gray_b, Jul 8, 2017.

  1. #1
    My old computer is running a very old version of Apache 2.2.17 php 5.3.5 etc as my ecommerce site. It is running perfectly.

    However I need to upgrade, so I have a new fast computer. And I need to it up and running with a development site using a new domain name

    WAMP 3.0.9
    apache 2.4.18
    php7.0.3
    mysql 5.6.29
    windows 10

    Both computers are connected to the same router.

    Needless to say the new computer does not work with Apache. Localhost:7777 works as I have set port forwarding on router.

    Does anyone have a step by step guide, or at least talk me through it.

    Many thanks in Advance
    SEMrush
     
    gray_b, Jul 8, 2017 IP
    SEMrush
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,626
    Likes Received:
    719
    Best Answers:
    151
    Trophy Points:
    420
    #2
    What are you talking about? What "does not work"? If you set up WAMP, and it works on localhost, it works. So what is the problem? That you cannot reach the machine from outside the network? That you cannot reach the machine from WITHIN the network? If you have multiple machines running Apache inside the router, you're shit out of luck, unless you set up either a gateway computer that handles the routing, or you can set up DNS inside the router, or just suffix the address with a port-number to reach the second server. I fail to see why you don't just setup everything on ONE Apache server (the new one), however... unless your setup is broken and crappy coded, upgrading the PHP-version should not break anything, nor should upgrading Apache or MySQL. The backwards compatibility of these packages are very, very good.
     
    PoPSiCLe, Jul 8, 2017 IP
  3. gray_b

    gray_b Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    I think you are trying to tell me I am wasting my time, in trying to run 2 seperate Apache servers on 2 different machines, behind a router.

    Then you say "or just suffix the address with a port-number to reach the second server." But this what I am doing, router port forwarding, points 80 to my old machine and 7777 to my new machine.

    Problem is that "localhost:7777/prestashopv1.7.1/admin/" works OK and I can access everything in the admin side.

    When I try to use "localhost:7777/prestashopv1.7.1/" I get error - The requested URL /prestashopv1.7.1/ was not found on this server.

    The domain name used on this new computer is http://www.fruitnuttrees.co.uk/ but it brings up the main home page on my old computer. As when I turn off my old computer I get a timed out blank screen.

    I am sorry if I sound a bit dumb, but if I said I home soldered my first Sinclair ZX80 (with 1kb memory) computer kit together, that should give an indication of my years of maturity.
     
    gray_b, Jul 8, 2017 IP
  4. hiuufji

    hiuufji Active Member

    Messages:
    212
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    80
    #4
    better take a hosting from hosting provider
     
    hiuufji, Jul 8, 2017 IP
  5. billzo

    billzo Well-Known Member

    Messages:
    961
    Likes Received:
    278
    Best Answers:
    15
    Trophy Points:
    113
    #5
    You are taking something rather simple and making it complex which will make it harder to port your code to a real working server on the net. What you should do is open up your hosts file, enter your domain name in it (Google how to do it), and then have it set to the IP address of the computer that particular site is on, with Apache answering on both computers to the standard ports 80 and 443 (https). I can't see why you would do this with non-standard ports when you could just resolve the domain to the proper computer using the hosts file on your development machine.

    So if you type on your development machine fruitandnuts.tld, your hosts file will resolve the DNS to the correct machine, either 127.0.0.1 for your local development computer or the internal LAN IP address of the other computer.

    Another thing you could do would be to install virtualization software on your new Windows 10 machine like Virtual Box and have it set to "bridged mode" so each virtual machine you create has its own IP address on your one new computer. Then you could have an old Linux/Apache/MySQL (LAMP) with PHP 5.3 on one virtualized machine with another virtualized machine with a newer version of LAMP all one one machine.

    I hope this make sense as I am typing fast and have other things to do today. :) If not, perhaps somebody will fill in the blanks.
     
    billzo, Jul 9, 2017 IP
  6. gray_b

    gray_b Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #6
    That is much appreciated 'billzo' I will have a go at that tomorrow.

    Today I have deleted the new installation, and reinstalled a new clean copy, so I can start off afresh. It is however by default set to port 80, so I will have to change ports and incorporate your message tomorrow.

    Cheers
     
    gray_b, Jul 9, 2017 IP
  7. gray_b

    gray_b Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #7
    Hi 'billzo'
    That has done it, changed windows hosts file to add

    192.168.0.7 www.fruitnuttrees.co.uk
    ::1 fruitnuttrees.co.uk

    It all works now.

    But how do I get rid of the port number from www.fruitnuttrees.co.uk:8080 also do I need to change ::1 fruitnuttrees.co.uk

    A thumbs up for 'billzo'
     
    gray_b, Jul 11, 2017 IP
  8. billzo

    billzo Well-Known Member

    Messages:
    961
    Likes Received:
    278
    Best Answers:
    15
    Trophy Points:
    113
    #8
    Well, I don't have any experience with IPv6, but normally you would have two entries in your hosts file to mimic DNS a records for the domain and the www version such as:

    192.168.0.7 www.fruitnuttrees.co.uk
    192.168.0.7 fruitnuttrees.co.uk

    However, in your case the ::1 entry may work as well. But I think it is best to do it right with the IP address of the virtual server you are running, if you did it as suggested. Then your server determines one of the versions to answer for and redirects for the other version.

    As for the old 8080 port number, I'm not sure where you are talking about, as in inside the Apache config to answer for port 8080, the server you had in front to send requests to the 8080 backend, or on internal links on your website you hard coded to port 8080?. Where is the :8080?

    Try as much as possible to mimic your real-world setup with your development server. If you are using https on your production server on the web, do so with your development setup. If you are on shared hosting, you will have htaccess enabled so have it set up like that on your development server.

    I hope this answers any questions you may have. If not, reply back.
     
    billzo, Jul 12, 2017 IP
  9. gray_b

    gray_b Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #9
    I am not sure why but http://www.fruitnuttrees.co.uk/ directs me to my old machines start page.
     
    gray_b, Jul 12, 2017 IP
  10. gray_b

    gray_b Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #10
    One of the suggestions was to port forward on my router, the same port 80 to 2 different ip address's namely 192.168.0.3 and 192.168.0.7
    On my router (and I think all) it does not allow me to do that, only to 1 port. So at the moment port 80 is forwarded to my old computer. Even thou it does not have a virtualhost setup for http://www.fruitnuttrees.co.uk/ by default it must take the 1st virtualhost that is on of my old computer.
    Apart from using a different port, i can see no way of setting up 2 different Apaches on 2 different machines under the same ip address. But surely there must be. I cannot be inventing the wheel???
     
    gray_b, Jul 14, 2017 IP
  11. billzo

    billzo Well-Known Member

    Messages:
    961
    Likes Received:
    278
    Best Answers:
    15
    Trophy Points:
    113
    #11
    Hi. I am not sure why you would want two Apaches running on the same IP address and without using ports, I don't think it is possible. You would have to set up a front-end with some way of knowing which port/Apache installation you want to direct each particular request to.

    If my understanding is correct, you have a working e-commerce site that is using an old version of PHP and you want to update your code. Is that right? Is your site hosted on your home computer? My understanding, which my be incorrect, was that you wanted to have a local copy of your working site using PHP 5.3 and you want to be able to port your code to a newer version of PHP. Right or wrong? Because setting up two virtual machines with different Apaches/PHP versions plus different IP addresses on the same computer would be a way to do what you want. It depends on how you have your URL coded internally in your website. If you have one URL hard-coded and use that across the entire site--or relative URLS--then you could just set up a separate hosts file entry for fruitnuttreesdev.co.uk and use that as your temporary development URL.

    If you need help, report back. If you got it solved, then perhaps you could also report back to let us know what you did. :)
     
    billzo, Jul 15, 2017 IP