Page 1 of 1

need some help to start

PostPosted: 29. November 2016 20:21
by newdev
Hi,

I am a new developper... I used to program PHP with eclipse and easyphp. Now I am working for a company that uses different software... Can you help me understand the process?
I am using Tortoise. So I have downloaded all my files in a folder on my C.
I downloaded XAMPP. Apache and Mysql are running properly.
Now I need help to setup apache to point http://nameofmywebsite.dev document root to /code/www/public

I watched a lot of tutorials, which is saying to put the website in htdocs. Is that what I have to do even if i m using Tortoise? Should I copy the folder that is on my C that contains all my website to htdocs?

Re: need some help to start

PostPosted: 30. November 2016 15:52
by Nobbie
newdev wrote:Now I need help to setup apache to point http://nameofmywebsite.dev document root to /code/www/public


So simply do it - edit the Apache configuration and point DocumentRoot (thats a configuration option) to /code/www/public. Also adapt the "<Directory ...>" configuration to your needs (there is currently one for the htdocs folder).
You may also create a VirtualHost for nameofmywebsite.dev, if you need different behaviour for localhost and/or nameofmywebsite.dev

See https://httpd.apache.org/docs/2.4/en/mo ... cumentroot
and https://httpd.apache.org/docs/2.4/en/mo ... irtualhost

There are also plenty of tutorials and videos in the internet about VirtualHosts etc. (simply Google for it).

Turtoise is unknown to me, i cannot say anything about it.

newdev wrote:I watched a lot of tutorials, which is saying to put the website in htdocs. Is that what I have to do even if i m using Tortoise?


No, htdocs is the "out of the box" DocumentRoot for the Xampp installation, but of course you may feel free to change that location and/or to create a new VirtualHost with its own DocumentRoot. A VirtualHost simply is another Domainname with its own DocumentRoot and Options for the same PC (or IP). With the help of VirtualHosts your are able to run different Domainnames like different Servers on one Apache installation (you dont need to multiply Apache and you dont need to run multiplce PCs).

Re: need some help to start

PostPosted: 30. November 2016 18:15
by JJ_Tagy
Tortoise probably means Tortoise-Git or Tortoise-SVN. I think he's saying that he is doing a version control replication of the live site.

Re: need some help to start

PostPosted: 30. November 2016 18:17
by newdev
yes sorry, I meant Tortoise-SVN
JJ_Tagy wrote:Tortoise probably means Tortoise-Git or Tortoise-SVN. I think he's saying that he is doing a version control replication of the live site.

Re: need some help to start

PostPosted: 30. November 2016 19:27
by JJ_Tagy
Just realize that many times tutorials are very specific to certain setups, usage, etc. In this case, no, you do not have to put the folder in htdocs. See above where Nobbie describes the virtualhost.