Re: Set multiple DocumentRoot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for all responses.

I've tried first suggestion to use 80 and 8080 as following set up:

Listen 8080
Listen 80

NameVirtualHost *:80
NameVirtualHost *:8080

<VirtualHost *:8080>
    ServerName 192.168.1.101
    DocumentRoot /var/www/html/
</VirtualHost>

<VirtualHost *:80>
    ServerName 192.168.1.101
    DocumentRoot /tmp
</VirtualHost>

The 8080 works, but 80 got an error of "Permission denied: file
permissions deny server access: /tmp/index.html". I don't see any
permission problems:

[tmp]$ ls -l index.html
-rwxr-xr-x. 1 apache apache 27 Oct 28 15:48 index.html

On 10/26/12, Pete Houston <ph1@xxxxxxxxxxxxxxxx> wrote:
> On Fri, Oct 26, 2012 at 08:02:11PM +1000, jupiter wrote:
>> I need to set DocumentRoot to two directories, one for development and
>> one for testing. But the server has only one IP address, and there is
>> no DNS. Is it possible? If so, please give an example.
>
> Use different ports. You can set up two virtual hosts, eg. one on port 80
> for testing and one on port 8080 for development.
>
> Pete
> --
> Openstrike - improving business through open source
> http://www.openstrike.co.uk/ or call 01722 770036 / 07092 020107
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux