Answer the question
In order to leave comments, you need to log in
Setting up virtual hosts on a local server?
Hello dear associates. Question about setting up virtual hosts on a local server.
Given.
I have a local Macbook machine with the MAMP Web Server installed on it. On the same machine with the same web server, 8 local sites have been living and doing great for a long time (mostly all on WordPress). All sites on the local server open on a transition like: localhost: 8888 / site-name / (as far as I understand, the local Apache server uses port 8888).
There was a need to install another site on the local server, but there are certain nuances with it. This site is completely self-written and quite complex. It is installed and works exclusively by installing a virtual host. Those. on the machine on which it is already installed in the browser, the site is available at:business-catalog.net.www
The local machine on which the site is already running and from which it needs to be transferred to my MacBook runs under the WinXP operating system, with the XAMPP web server installed and configured.
What I have already done on my MacBook:
In the httpd.conf file, I uncommented the line: Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
In the httpd-vhosts.conf file, I added a text like this at the end:
In the etc/ file hosts added a line like: 127.0.0.1 business-catalog.net.www
As a result, nothing helps. With the MAMP web server running or stopped, at business-catalog.net.www I see a heartbreaking inscription: “It Works!”
Question What am I doing wrongHow do you set up a virtual host? Did I correctly specify port 8888 in httpd-vhosts.conf or should I have left it as it was by default 80? Was it necessary to insert this text there at all or in httpd.conf?
The information that php.info gives out is very confusing:
Why is Virtual Directory Support set to Disabled, how (and is it necessary?) to change it to Enabled (on a computer with Win Xp where the site successfully works locally, this function is displayed as Enabled in php.info)?
Thank you in advance for your help dear accomplices.
Answer the question
In order to leave comments, you need to log in
It may not suit you, but I would advise you to install Mamp Pro. There, this task is solved in three steps:
1) add a new host
2) specify the desired name
3) specify the physical path to the project root.
ps: only after Mump Pro was able to fully enjoy the development under the poppy, otherwise before that I tried everything and the dances with a tambourine came out worse than in Linux.
Take down the mump. This is ugliness!
habrahabr.ru/qa/38731/#answer_148435
I would also advise not to do the part related to Apache, for some reason it was built-in periodically, I personally gave strange statics.
Then nginx remains and it is done like this:
brew install nginx
brew install php54 --with-fpm
You are breaking into port 80, but you have registered port 8888 in the config, what do you expect from this, that the port will change itself or what?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question