woolyg Posted September 15, 2008 Share Posted September 15, 2008 Hi all, I have installed XAMPP twice on a testing machine (Don;t worry, I meant to do it to test this issue!). My question is - How do I access the second instance from a browser? For example - I have placed website 1 in C:\Folder_ONE\xampp\htdocs, and can access it using http://localhost in a browser. I have placed website 2 into C:\Folder_TWO\xampp\htdocs. Can anyone tell me how I would access website 2 in a browser? All help appreciated. WoolyG Quote Link to comment Share on other sites More sharing options...
Mchl Posted September 15, 2008 Share Posted September 15, 2008 The second Apache server would need to run on different port (default is 80) for example 8080 You would reach it by http://localhost:8080 Quote Link to comment Share on other sites More sharing options...
woolyg Posted September 15, 2008 Author Share Posted September 15, 2008 Cool, thanks. Where would I configure this? I was tinkering with httpd.conf, but it didn't work for me... WoolyG Quote Link to comment Share on other sites More sharing options...
Mchl Posted September 15, 2008 Share Posted September 15, 2008 Here's what's in my httpd.conf # # ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # If your host doesn't have a registered DNS name, enter its IP address here. # ServerName localhost:80 I have no experience in configuring apache, so it might be more than this setting to change Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 15, 2008 Share Posted September 15, 2008 Are you installing two instances of XAMPP so you can run two websites from one computer? If this is the case then you only need to install XAMPP once, then you just need to setup Virtual Hosts within Apache's httpd.conf file which will allow you to do something like http://sitenamehere.localhost/ or http://myfakedomain.com/ etc. Anyway to answer the question you will need to setup the second instance of XAMPP to run on a different port than the first instance, such as 8080. Quote Link to comment Share on other sites More sharing options...
woolyg Posted September 16, 2008 Author Share Posted September 16, 2008 Hi Wildteen88, No, I'm doing it to test the effect of installing a second web server on the machine - I understand that it is possible to run numerous sites from the one instance. Thanks for the help - I have a couple more Q's: Do I change that into on httpd.conf - the listen port and the server port? Will the second instance automatically use the MYSQL server on its instance, or could there be a crossover/confusion? Thanks, WoolyG Quote Link to comment Share on other sites More sharing options...
Mchl Posted September 16, 2008 Share Posted September 16, 2008 AFAIK default mySQL server's port is 3036, so both instances are trying to use it, and the first one wins, the other is unreachable (or doesn't start at all). So you'd have to change the port for the other instance od mySQL. Then in your script, when using mysql_connect, you will have to specify the port. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 16, 2008 Share Posted September 16, 2008 AFAIK default mySQL server's port is 3036 Not sure if thats was a typo but mysql runs on port 3306 Then in your script, when using mysql_connect, you will have to specify the port. Alternatively you can set the default port mysql_connect uses within the php.ini Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.