How to use domain name instead of local host IP with PHP Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!How do I find the authoritative name-server for a domain name?How do I access my website using the domain name instead of localhost?Is www a subdomain?Is there a substantial overhead when connect to a database by the domain name instead of the IP Address, over a local network?Two domain names pointing to one hostPHP cURL Local Domain Name ResolutionWhy does Microsoft Edge open some local websites, but not others, where the domain name is routed to 127.0.0.1 in hosts fileIP Address Shows instead of Domain NamePointing localhost to domain name gives errorHow to get A record of domain with local DNS server or manipulated hosts file

What does 丫 mean? 丫是什么意思?

NERDTreeMenu Remapping

How can a team of shapeshifters communicate?

Why do early math courses focus on the cross sections of a cone and not on other 3D objects?

Does the Black Tentacles spell do damage twice at the start of turn to an already restrained creature?

Random body shuffle every night—can we still function?

New Order #6: Easter Egg

Tannaka duality for semisimple groups

Resize vertical bars (absolute-value symbols)

Asymptotics question

How does the math work when buying airline miles?

How do living politicians protect their readily obtainable signatures from misuse?

The Nth Gryphon Number

What is the difference between a "ranged attack" and a "ranged weapon attack"?

What is the difference between CTSS and ITS?

The test team as an enemy of development? And how can this be avoided?

two integers one line calculator

Was Kant an Intuitionist about mathematical objects?

Is openssl rand command cryptographically secure?

Can an iPhone 7 be made to function as a NFC Tag?

Can you force honesty by using the Speak with Dead and Zone of Truth spells together?

What does Turing mean by this statement?

Is there hard evidence that the grant peer review system performs significantly better than random?

What is a more techy Technical Writer job title that isn't cutesy or confusing?



How to use domain name instead of local host IP with PHP



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!How do I find the authoritative name-server for a domain name?How do I access my website using the domain name instead of localhost?Is www a subdomain?Is there a substantial overhead when connect to a database by the domain name instead of the IP Address, over a local network?Two domain names pointing to one hostPHP cURL Local Domain Name ResolutionWhy does Microsoft Edge open some local websites, but not others, where the domain name is routed to 127.0.0.1 in hosts fileIP Address Shows instead of Domain NamePointing localhost to domain name gives errorHow to get A record of domain with local DNS server or manipulated hosts file



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








3















I'm experimenting some PHP code with a local IP address http://192.168.33.10.
When I was using the address in a form of number (192.168.33.10) it was working fine (see image 1), but when I try to use a domain name "dev.dotinstall.com", it reaches an error page (see image 2).



I learned that you can use a name like "dev.dotinstall.com" instead of IP address by editing hosts file, so I edited it adding a line "192.168.33.10 dev.dotinstall.com" at the end of the hosts file (see image 3).



The error page says "The fact that you are seeing this page indicates that the website you just visited is either experiencing problems or is undergoing routine maintenance.", but I don't know what the problem is.



Any idea why this is happening?



image1



image2



image3










share|improve this question
























  • Why C:UsersmarraDesktop ? Should be hosts in C:WindowsSystem32driversetc

    – Quasimodo's clone
    Mar 22 at 11:59












  • Thanks for the edit suggest, Aaron. This was my very first post and didn't know how to edit the "description" of image, and ended up posting the question. Thank you for giving me a more proper tag as well (dns instead of php).

    – Shinichi Takagi
    Mar 22 at 12:00











  • In the first screenshot, the IP is using port 8000. But the port number is missing from the second screenshot. WIthout the port number, port 80 is usually assumed. Try appending the port number to the domain name and see if that works. dev.dotinstall.com:8000.

    – josavish
    Mar 22 at 12:09











  • Quasimondo's clone Yes, it should be located in C:WindowsSystem32driversetc, but I couldn't directly open and edit it, so I first dragged it to my desktop and opened it by text editor Atom. After I saved the changed, I relocated to the etc folder. So I assume the hosts file is saved in the correct place.

    – Shinichi Takagi
    Mar 24 at 13:11











  • dev.dotinstall.com:8000 didn't work. It reached an error page saying "This site can’t be reached dev.dotinstall.com’s server IP address could not be found."

    – Shinichi Takagi
    Mar 24 at 13:51

















3















I'm experimenting some PHP code with a local IP address http://192.168.33.10.
When I was using the address in a form of number (192.168.33.10) it was working fine (see image 1), but when I try to use a domain name "dev.dotinstall.com", it reaches an error page (see image 2).



I learned that you can use a name like "dev.dotinstall.com" instead of IP address by editing hosts file, so I edited it adding a line "192.168.33.10 dev.dotinstall.com" at the end of the hosts file (see image 3).



The error page says "The fact that you are seeing this page indicates that the website you just visited is either experiencing problems or is undergoing routine maintenance.", but I don't know what the problem is.



Any idea why this is happening?



image1



image2



image3










share|improve this question
























  • Why C:UsersmarraDesktop ? Should be hosts in C:WindowsSystem32driversetc

    – Quasimodo's clone
    Mar 22 at 11:59












  • Thanks for the edit suggest, Aaron. This was my very first post and didn't know how to edit the "description" of image, and ended up posting the question. Thank you for giving me a more proper tag as well (dns instead of php).

    – Shinichi Takagi
    Mar 22 at 12:00











  • In the first screenshot, the IP is using port 8000. But the port number is missing from the second screenshot. WIthout the port number, port 80 is usually assumed. Try appending the port number to the domain name and see if that works. dev.dotinstall.com:8000.

    – josavish
    Mar 22 at 12:09











  • Quasimondo's clone Yes, it should be located in C:WindowsSystem32driversetc, but I couldn't directly open and edit it, so I first dragged it to my desktop and opened it by text editor Atom. After I saved the changed, I relocated to the etc folder. So I assume the hosts file is saved in the correct place.

    – Shinichi Takagi
    Mar 24 at 13:11











  • dev.dotinstall.com:8000 didn't work. It reached an error page saying "This site can’t be reached dev.dotinstall.com’s server IP address could not be found."

    – Shinichi Takagi
    Mar 24 at 13:51













3












3








3








I'm experimenting some PHP code with a local IP address http://192.168.33.10.
When I was using the address in a form of number (192.168.33.10) it was working fine (see image 1), but when I try to use a domain name "dev.dotinstall.com", it reaches an error page (see image 2).



I learned that you can use a name like "dev.dotinstall.com" instead of IP address by editing hosts file, so I edited it adding a line "192.168.33.10 dev.dotinstall.com" at the end of the hosts file (see image 3).



The error page says "The fact that you are seeing this page indicates that the website you just visited is either experiencing problems or is undergoing routine maintenance.", but I don't know what the problem is.



Any idea why this is happening?



image1



image2



image3










share|improve this question
















I'm experimenting some PHP code with a local IP address http://192.168.33.10.
When I was using the address in a form of number (192.168.33.10) it was working fine (see image 1), but when I try to use a domain name "dev.dotinstall.com", it reaches an error page (see image 2).



I learned that you can use a name like "dev.dotinstall.com" instead of IP address by editing hosts file, so I edited it adding a line "192.168.33.10 dev.dotinstall.com" at the end of the hosts file (see image 3).



The error page says "The fact that you are seeing this page indicates that the website you just visited is either experiencing problems or is undergoing routine maintenance.", but I don't know what the problem is.



Any idea why this is happening?



image1



image2



image3







dns localhost






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 22 at 12:03









Quasimodo's clone

4,67221131




4,67221131










asked Mar 22 at 11:54









Shinichi TakagiShinichi Takagi

186




186












  • Why C:UsersmarraDesktop ? Should be hosts in C:WindowsSystem32driversetc

    – Quasimodo's clone
    Mar 22 at 11:59












  • Thanks for the edit suggest, Aaron. This was my very first post and didn't know how to edit the "description" of image, and ended up posting the question. Thank you for giving me a more proper tag as well (dns instead of php).

    – Shinichi Takagi
    Mar 22 at 12:00











  • In the first screenshot, the IP is using port 8000. But the port number is missing from the second screenshot. WIthout the port number, port 80 is usually assumed. Try appending the port number to the domain name and see if that works. dev.dotinstall.com:8000.

    – josavish
    Mar 22 at 12:09











  • Quasimondo's clone Yes, it should be located in C:WindowsSystem32driversetc, but I couldn't directly open and edit it, so I first dragged it to my desktop and opened it by text editor Atom. After I saved the changed, I relocated to the etc folder. So I assume the hosts file is saved in the correct place.

    – Shinichi Takagi
    Mar 24 at 13:11











  • dev.dotinstall.com:8000 didn't work. It reached an error page saying "This site can’t be reached dev.dotinstall.com’s server IP address could not be found."

    – Shinichi Takagi
    Mar 24 at 13:51

















  • Why C:UsersmarraDesktop ? Should be hosts in C:WindowsSystem32driversetc

    – Quasimodo's clone
    Mar 22 at 11:59












  • Thanks for the edit suggest, Aaron. This was my very first post and didn't know how to edit the "description" of image, and ended up posting the question. Thank you for giving me a more proper tag as well (dns instead of php).

    – Shinichi Takagi
    Mar 22 at 12:00











  • In the first screenshot, the IP is using port 8000. But the port number is missing from the second screenshot. WIthout the port number, port 80 is usually assumed. Try appending the port number to the domain name and see if that works. dev.dotinstall.com:8000.

    – josavish
    Mar 22 at 12:09











  • Quasimondo's clone Yes, it should be located in C:WindowsSystem32driversetc, but I couldn't directly open and edit it, so I first dragged it to my desktop and opened it by text editor Atom. After I saved the changed, I relocated to the etc folder. So I assume the hosts file is saved in the correct place.

    – Shinichi Takagi
    Mar 24 at 13:11











  • dev.dotinstall.com:8000 didn't work. It reached an error page saying "This site can’t be reached dev.dotinstall.com’s server IP address could not be found."

    – Shinichi Takagi
    Mar 24 at 13:51
















Why C:UsersmarraDesktop ? Should be hosts in C:WindowsSystem32driversetc

– Quasimodo's clone
Mar 22 at 11:59






Why C:UsersmarraDesktop ? Should be hosts in C:WindowsSystem32driversetc

– Quasimodo's clone
Mar 22 at 11:59














Thanks for the edit suggest, Aaron. This was my very first post and didn't know how to edit the "description" of image, and ended up posting the question. Thank you for giving me a more proper tag as well (dns instead of php).

– Shinichi Takagi
Mar 22 at 12:00





Thanks for the edit suggest, Aaron. This was my very first post and didn't know how to edit the "description" of image, and ended up posting the question. Thank you for giving me a more proper tag as well (dns instead of php).

– Shinichi Takagi
Mar 22 at 12:00













In the first screenshot, the IP is using port 8000. But the port number is missing from the second screenshot. WIthout the port number, port 80 is usually assumed. Try appending the port number to the domain name and see if that works. dev.dotinstall.com:8000.

– josavish
Mar 22 at 12:09





In the first screenshot, the IP is using port 8000. But the port number is missing from the second screenshot. WIthout the port number, port 80 is usually assumed. Try appending the port number to the domain name and see if that works. dev.dotinstall.com:8000.

– josavish
Mar 22 at 12:09













Quasimondo's clone Yes, it should be located in C:WindowsSystem32driversetc, but I couldn't directly open and edit it, so I first dragged it to my desktop and opened it by text editor Atom. After I saved the changed, I relocated to the etc folder. So I assume the hosts file is saved in the correct place.

– Shinichi Takagi
Mar 24 at 13:11





Quasimondo's clone Yes, it should be located in C:WindowsSystem32driversetc, but I couldn't directly open and edit it, so I first dragged it to my desktop and opened it by text editor Atom. After I saved the changed, I relocated to the etc folder. So I assume the hosts file is saved in the correct place.

– Shinichi Takagi
Mar 24 at 13:11













dev.dotinstall.com:8000 didn't work. It reached an error page saying "This site can’t be reached dev.dotinstall.com’s server IP address could not be found."

– Shinichi Takagi
Mar 24 at 13:51





dev.dotinstall.com:8000 didn't work. It reached an error page saying "This site can’t be reached dev.dotinstall.com’s server IP address could not be found."

– Shinichi Takagi
Mar 24 at 13:51












1 Answer
1






active

oldest

votes


















1














You are correct that you need to add the URL into the hosts file. Make sure you have saved it correctly (with administrator rights) and the port is correct.



This is not enough though, you will need to set up a virtual host for Apache as well and then restart Apache. If you only set the URL in the hosts file, then Apache will not know what to do with it. There are plenty of materials on setting up a virtual host for Apache on Windows if you search for that.






share|improve this answer























  • @ShinichiTakagi you are welcome. If this answers your question, then you might consider accepting it as the correct answer.

    – Lajos Arpad
    Mar 24 at 12:52











  • Well, I meant to ask more, but it was posted when I just pressed the enter button when my post was still incomplete. Does this process assume that you have already installed Apache in the first place? I checked my local C: directory, but it seems there is no Apache in it

    – Shinichi Takagi
    Mar 24 at 13:08












  • @ShinichiTakagi you need a webserver to handle requests. Apache is a possibility. I assumed you were using Apache based on the images you posted in your question. If you install Apache (as part of WAMP, for example), then adding the URL to the hosts file and ensuring that Apache supports virtual host usage, also, ensuring that you have the proper settings for your virtual host URL in the config should solve your issue. I've don this many times in different operating systems successfully.

    – Lajos Arpad
    Mar 25 at 13:05











  • When I tried adding a port number 8000 like dev.dotinstall.com:8000, it worked just fine, even though I didn't do anything special with Apache. Though I've solved the problem I originally had, I want to deepen my understanding a little more. What is the thing that you cannot do without Apache? So is it also possible to do the same thing without Apache? For this PHP experiment, I've been using Vagrant, Putty, and CyberDuck. Do these three have anything to do with working as a substitute for Apache?

    – Shinichi Takagi
    Mar 25 at 16:37












  • @ShinichiTakagi there is nothing you can't do without Apache. Apache is a webserver among many. There are other webservers that you can use with PHP, like IIS, NginX and yes, CyberDuck, which you were using as a server. I have never used CyberDuck as webserver, so I cannot give you an opinion about it, but since it was working for you, you are good to go for now, it is premature to choose webservers, you need to get some first hand experience first to have some ideas to what to look for when searching for webservers.

    – Lajos Arpad
    Mar 26 at 17:31











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55299070%2fhow-to-use-domain-name-instead-of-local-host-ip-with-php%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














You are correct that you need to add the URL into the hosts file. Make sure you have saved it correctly (with administrator rights) and the port is correct.



This is not enough though, you will need to set up a virtual host for Apache as well and then restart Apache. If you only set the URL in the hosts file, then Apache will not know what to do with it. There are plenty of materials on setting up a virtual host for Apache on Windows if you search for that.






share|improve this answer























  • @ShinichiTakagi you are welcome. If this answers your question, then you might consider accepting it as the correct answer.

    – Lajos Arpad
    Mar 24 at 12:52











  • Well, I meant to ask more, but it was posted when I just pressed the enter button when my post was still incomplete. Does this process assume that you have already installed Apache in the first place? I checked my local C: directory, but it seems there is no Apache in it

    – Shinichi Takagi
    Mar 24 at 13:08












  • @ShinichiTakagi you need a webserver to handle requests. Apache is a possibility. I assumed you were using Apache based on the images you posted in your question. If you install Apache (as part of WAMP, for example), then adding the URL to the hosts file and ensuring that Apache supports virtual host usage, also, ensuring that you have the proper settings for your virtual host URL in the config should solve your issue. I've don this many times in different operating systems successfully.

    – Lajos Arpad
    Mar 25 at 13:05











  • When I tried adding a port number 8000 like dev.dotinstall.com:8000, it worked just fine, even though I didn't do anything special with Apache. Though I've solved the problem I originally had, I want to deepen my understanding a little more. What is the thing that you cannot do without Apache? So is it also possible to do the same thing without Apache? For this PHP experiment, I've been using Vagrant, Putty, and CyberDuck. Do these three have anything to do with working as a substitute for Apache?

    – Shinichi Takagi
    Mar 25 at 16:37












  • @ShinichiTakagi there is nothing you can't do without Apache. Apache is a webserver among many. There are other webservers that you can use with PHP, like IIS, NginX and yes, CyberDuck, which you were using as a server. I have never used CyberDuck as webserver, so I cannot give you an opinion about it, but since it was working for you, you are good to go for now, it is premature to choose webservers, you need to get some first hand experience first to have some ideas to what to look for when searching for webservers.

    – Lajos Arpad
    Mar 26 at 17:31















1














You are correct that you need to add the URL into the hosts file. Make sure you have saved it correctly (with administrator rights) and the port is correct.



This is not enough though, you will need to set up a virtual host for Apache as well and then restart Apache. If you only set the URL in the hosts file, then Apache will not know what to do with it. There are plenty of materials on setting up a virtual host for Apache on Windows if you search for that.






share|improve this answer























  • @ShinichiTakagi you are welcome. If this answers your question, then you might consider accepting it as the correct answer.

    – Lajos Arpad
    Mar 24 at 12:52











  • Well, I meant to ask more, but it was posted when I just pressed the enter button when my post was still incomplete. Does this process assume that you have already installed Apache in the first place? I checked my local C: directory, but it seems there is no Apache in it

    – Shinichi Takagi
    Mar 24 at 13:08












  • @ShinichiTakagi you need a webserver to handle requests. Apache is a possibility. I assumed you were using Apache based on the images you posted in your question. If you install Apache (as part of WAMP, for example), then adding the URL to the hosts file and ensuring that Apache supports virtual host usage, also, ensuring that you have the proper settings for your virtual host URL in the config should solve your issue. I've don this many times in different operating systems successfully.

    – Lajos Arpad
    Mar 25 at 13:05











  • When I tried adding a port number 8000 like dev.dotinstall.com:8000, it worked just fine, even though I didn't do anything special with Apache. Though I've solved the problem I originally had, I want to deepen my understanding a little more. What is the thing that you cannot do without Apache? So is it also possible to do the same thing without Apache? For this PHP experiment, I've been using Vagrant, Putty, and CyberDuck. Do these three have anything to do with working as a substitute for Apache?

    – Shinichi Takagi
    Mar 25 at 16:37












  • @ShinichiTakagi there is nothing you can't do without Apache. Apache is a webserver among many. There are other webservers that you can use with PHP, like IIS, NginX and yes, CyberDuck, which you were using as a server. I have never used CyberDuck as webserver, so I cannot give you an opinion about it, but since it was working for you, you are good to go for now, it is premature to choose webservers, you need to get some first hand experience first to have some ideas to what to look for when searching for webservers.

    – Lajos Arpad
    Mar 26 at 17:31













1












1








1







You are correct that you need to add the URL into the hosts file. Make sure you have saved it correctly (with administrator rights) and the port is correct.



This is not enough though, you will need to set up a virtual host for Apache as well and then restart Apache. If you only set the URL in the hosts file, then Apache will not know what to do with it. There are plenty of materials on setting up a virtual host for Apache on Windows if you search for that.






share|improve this answer













You are correct that you need to add the URL into the hosts file. Make sure you have saved it correctly (with administrator rights) and the port is correct.



This is not enough though, you will need to set up a virtual host for Apache as well and then restart Apache. If you only set the URL in the hosts file, then Apache will not know what to do with it. There are plenty of materials on setting up a virtual host for Apache on Windows if you search for that.







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 22 at 12:34









Lajos ArpadLajos Arpad

29k1863121




29k1863121












  • @ShinichiTakagi you are welcome. If this answers your question, then you might consider accepting it as the correct answer.

    – Lajos Arpad
    Mar 24 at 12:52











  • Well, I meant to ask more, but it was posted when I just pressed the enter button when my post was still incomplete. Does this process assume that you have already installed Apache in the first place? I checked my local C: directory, but it seems there is no Apache in it

    – Shinichi Takagi
    Mar 24 at 13:08












  • @ShinichiTakagi you need a webserver to handle requests. Apache is a possibility. I assumed you were using Apache based on the images you posted in your question. If you install Apache (as part of WAMP, for example), then adding the URL to the hosts file and ensuring that Apache supports virtual host usage, also, ensuring that you have the proper settings for your virtual host URL in the config should solve your issue. I've don this many times in different operating systems successfully.

    – Lajos Arpad
    Mar 25 at 13:05











  • When I tried adding a port number 8000 like dev.dotinstall.com:8000, it worked just fine, even though I didn't do anything special with Apache. Though I've solved the problem I originally had, I want to deepen my understanding a little more. What is the thing that you cannot do without Apache? So is it also possible to do the same thing without Apache? For this PHP experiment, I've been using Vagrant, Putty, and CyberDuck. Do these three have anything to do with working as a substitute for Apache?

    – Shinichi Takagi
    Mar 25 at 16:37












  • @ShinichiTakagi there is nothing you can't do without Apache. Apache is a webserver among many. There are other webservers that you can use with PHP, like IIS, NginX and yes, CyberDuck, which you were using as a server. I have never used CyberDuck as webserver, so I cannot give you an opinion about it, but since it was working for you, you are good to go for now, it is premature to choose webservers, you need to get some first hand experience first to have some ideas to what to look for when searching for webservers.

    – Lajos Arpad
    Mar 26 at 17:31

















  • @ShinichiTakagi you are welcome. If this answers your question, then you might consider accepting it as the correct answer.

    – Lajos Arpad
    Mar 24 at 12:52











  • Well, I meant to ask more, but it was posted when I just pressed the enter button when my post was still incomplete. Does this process assume that you have already installed Apache in the first place? I checked my local C: directory, but it seems there is no Apache in it

    – Shinichi Takagi
    Mar 24 at 13:08












  • @ShinichiTakagi you need a webserver to handle requests. Apache is a possibility. I assumed you were using Apache based on the images you posted in your question. If you install Apache (as part of WAMP, for example), then adding the URL to the hosts file and ensuring that Apache supports virtual host usage, also, ensuring that you have the proper settings for your virtual host URL in the config should solve your issue. I've don this many times in different operating systems successfully.

    – Lajos Arpad
    Mar 25 at 13:05











  • When I tried adding a port number 8000 like dev.dotinstall.com:8000, it worked just fine, even though I didn't do anything special with Apache. Though I've solved the problem I originally had, I want to deepen my understanding a little more. What is the thing that you cannot do without Apache? So is it also possible to do the same thing without Apache? For this PHP experiment, I've been using Vagrant, Putty, and CyberDuck. Do these three have anything to do with working as a substitute for Apache?

    – Shinichi Takagi
    Mar 25 at 16:37












  • @ShinichiTakagi there is nothing you can't do without Apache. Apache is a webserver among many. There are other webservers that you can use with PHP, like IIS, NginX and yes, CyberDuck, which you were using as a server. I have never used CyberDuck as webserver, so I cannot give you an opinion about it, but since it was working for you, you are good to go for now, it is premature to choose webservers, you need to get some first hand experience first to have some ideas to what to look for when searching for webservers.

    – Lajos Arpad
    Mar 26 at 17:31
















@ShinichiTakagi you are welcome. If this answers your question, then you might consider accepting it as the correct answer.

– Lajos Arpad
Mar 24 at 12:52





@ShinichiTakagi you are welcome. If this answers your question, then you might consider accepting it as the correct answer.

– Lajos Arpad
Mar 24 at 12:52













Well, I meant to ask more, but it was posted when I just pressed the enter button when my post was still incomplete. Does this process assume that you have already installed Apache in the first place? I checked my local C: directory, but it seems there is no Apache in it

– Shinichi Takagi
Mar 24 at 13:08






Well, I meant to ask more, but it was posted when I just pressed the enter button when my post was still incomplete. Does this process assume that you have already installed Apache in the first place? I checked my local C: directory, but it seems there is no Apache in it

– Shinichi Takagi
Mar 24 at 13:08














@ShinichiTakagi you need a webserver to handle requests. Apache is a possibility. I assumed you were using Apache based on the images you posted in your question. If you install Apache (as part of WAMP, for example), then adding the URL to the hosts file and ensuring that Apache supports virtual host usage, also, ensuring that you have the proper settings for your virtual host URL in the config should solve your issue. I've don this many times in different operating systems successfully.

– Lajos Arpad
Mar 25 at 13:05





@ShinichiTakagi you need a webserver to handle requests. Apache is a possibility. I assumed you were using Apache based on the images you posted in your question. If you install Apache (as part of WAMP, for example), then adding the URL to the hosts file and ensuring that Apache supports virtual host usage, also, ensuring that you have the proper settings for your virtual host URL in the config should solve your issue. I've don this many times in different operating systems successfully.

– Lajos Arpad
Mar 25 at 13:05













When I tried adding a port number 8000 like dev.dotinstall.com:8000, it worked just fine, even though I didn't do anything special with Apache. Though I've solved the problem I originally had, I want to deepen my understanding a little more. What is the thing that you cannot do without Apache? So is it also possible to do the same thing without Apache? For this PHP experiment, I've been using Vagrant, Putty, and CyberDuck. Do these three have anything to do with working as a substitute for Apache?

– Shinichi Takagi
Mar 25 at 16:37






When I tried adding a port number 8000 like dev.dotinstall.com:8000, it worked just fine, even though I didn't do anything special with Apache. Though I've solved the problem I originally had, I want to deepen my understanding a little more. What is the thing that you cannot do without Apache? So is it also possible to do the same thing without Apache? For this PHP experiment, I've been using Vagrant, Putty, and CyberDuck. Do these three have anything to do with working as a substitute for Apache?

– Shinichi Takagi
Mar 25 at 16:37














@ShinichiTakagi there is nothing you can't do without Apache. Apache is a webserver among many. There are other webservers that you can use with PHP, like IIS, NginX and yes, CyberDuck, which you were using as a server. I have never used CyberDuck as webserver, so I cannot give you an opinion about it, but since it was working for you, you are good to go for now, it is premature to choose webservers, you need to get some first hand experience first to have some ideas to what to look for when searching for webservers.

– Lajos Arpad
Mar 26 at 17:31





@ShinichiTakagi there is nothing you can't do without Apache. Apache is a webserver among many. There are other webservers that you can use with PHP, like IIS, NginX and yes, CyberDuck, which you were using as a server. I have never used CyberDuck as webserver, so I cannot give you an opinion about it, but since it was working for you, you are good to go for now, it is premature to choose webservers, you need to get some first hand experience first to have some ideas to what to look for when searching for webservers.

– Lajos Arpad
Mar 26 at 17:31



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55299070%2fhow-to-use-domain-name-instead-of-local-host-ip-with-php%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript