| | |
assign different web address for different webprojects on my localhost
![]() |
•
•
Join Date: Oct 2006
Posts: 42
Reputation:
Solved Threads: 0
Hi
I am using Ubuntu linux 8.10
I have installed Apache, PHP and MySQL on my pc and testing all scripts on my localhost by http://localhost/ .
Currently I am creating directories for each web projects to test on my localhost. So my project can be access by http://localhost/project01/ and so on.
Example
http://localhost/project01 will access /var/www/project01
http://localhost/project02 will access /var/www/project02
There is some problems with server path in coding. When I would use file copy/paste process on my localhost, it requre path from root to work. And the path is different on my localhost and on sever.
So I think to use different domain name for different projects.
Example :
http://project01/ will access /var/www/project01
http://project02/ will access /var/www/project02
... or any other solution will be also welcome, so my localhost files and servers files are perfectly same.
Any guide for this?
Thank you.
I am using Ubuntu linux 8.10
I have installed Apache, PHP and MySQL on my pc and testing all scripts on my localhost by http://localhost/ .
Currently I am creating directories for each web projects to test on my localhost. So my project can be access by http://localhost/project01/ and so on.
Example
http://localhost/project01 will access /var/www/project01
http://localhost/project02 will access /var/www/project02
There is some problems with server path in coding. When I would use file copy/paste process on my localhost, it requre path from root to work. And the path is different on my localhost and on sever.
So I think to use different domain name for different projects.
Example :
http://project01/ will access /var/www/project01
http://project02/ will access /var/www/project02
... or any other solution will be also welcome, so my localhost files and servers files are perfectly same.
Any guide for this?
Thank you.
•
•
Join Date: May 2009
Posts: 11
Reputation:
Solved Threads: 3
if you are okay with the apache name based vhost config (see end of the default httpd.conf for an example)
The name resolution (so your server knows its got other names) is also fairly simple.
You can add the extra names to your /etc/host file. This is generally used to find names for servers before DNS is touched (which is configurable) so you can use the same technique for testing actual domains locally if required.
The name resolution (so your server knows its got other names) is also fairly simple.
You can add the extra names to your /etc/host file. This is generally used to find names for servers before DNS is touched (which is configurable) so you can use the same technique for testing actual domains locally if required.
![]() |
Other Threads in the Linux Servers and Apache Forum
- Previous Thread: Is the Linux Foundation Our NRA?
- Next Thread: Looking for Linux: InterOp Las Vegas
| Thread Tools | Search this Thread |
.net apache apple asus bbc bluegene centos cisco citrix cloud cloudcomputing datacenters debian dell desktops development distributions distros drivers economy eeepc energy enterprise fedora gadgets gentoo gos government gpl hardware hp hyper-v ibm java jobs kindle knoppix kvm laptop laptops lawsuits licensing limo linustorvalds linux linuxfoundation linuxmagazine magazines microserver microsoft mobile mobilephones netbook netbooks news novell olpc open openmoko openoffice opensolaris opensource opensuse openvz operatingsystems os patents pc pcworld plathome politics print qumranet redhat rhel robot russia sco server servers slackware software solaris source sun supercomputer support tivo torvalds training tv ubuntu umpc unix virtualization vmware windows x86 xandros xen





