FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 10-08-2008, 09:43 AM
"Star Liu"
 
Default how to add a virtual directory in apache with support to php files?

I'm learning to use php. when i drop my Welcome.php into /var/www,
which is the default root directory for localhost, and visit it by
http://localhost/Welcome.php, it can display the html normally; but i
want my php files in another place like /root/MyLife/LifeOS/StarLiu/,
so I add a entry into /etc/apache2/sites-available/default, like this:

Alias /php/ "/root/MyLife/LifeOS/"
<Directory "/root/MyLife/LifeOS/">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

then i visit it by http://localhost/php/StarLiu/Welcome.php, but it
pops out the download dialog to download the Welcome.php file.

it seems i didn't configure it correctly, how can i fix it? thanks

--
MY IMs, Welcome to add me as a debian user or a web developer!
(msn) starliu@live.com
(xmpp) minxinjianxin@gmail.com


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 10-08-2008, 12:30 PM
Rich Healey
 
Default how to add a virtual directory in apache with support to php files?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Star Liu wrote:
> I'm learning to use php. when i drop my Welcome.php into /var/www,
> which is the default root directory for localhost, and visit it by
> http://localhost/Welcome.php, it can display the html normally; but i
> want my php files in another place like /root/MyLife/LifeOS/StarLiu/,
> so I add a entry into /etc/apache2/sites-available/default, like this:
>
> Alias /php/ "/root/MyLife/LifeOS/"
> <Directory "/root/MyLife/LifeOS/">
> Options Indexes FollowSymLinks MultiViews
> AllowOverride None
> Order allow,deny
> allow from all
> </Directory>
>
> then i visit it by http://localhost/php/StarLiu/Welcome.php, but it
> pops out the download dialog to download the Welcome.php file.
>
> it seems i didn't configure it correctly, how can i fix it? thanks
>
This is probably better directed at an apache list, but from memory you
need to take your handler directives and nest them in the directory tags.

Or apply them globally.

Sorry for the vague reply

- --
Rich Healey - iTReign .'`. / healey.rich@gmail.com
Developer / Systems Admin : :' : / healey.rich@itreign.com
AIM: richohealey33 `. `' / richo@psych0tik.net
MSN: bitchohealey@hotmail.com `- / richohealey@hellboundhackers.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjsp9MACgkQLeTfO4yBSAdsMgCeLkknfFQRAU xysVI986Qq7wYZ
cGwAoIc2ZT96ltynMu4UcHDALmzzj6Rd
=JNWr
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 10-08-2008, 12:41 PM
Cassiel
 
Default how to add a virtual directory in apache with support to php files?

install php modules (If you didn't yet) then add index.php to DirectoryIndex in dir.conf module inside /etc/apache2/mods-enabled/





>

> then i visit it by http://localhost/php/StarLiu/Welcome.php, but it

> pops out the download dialog to download the Welcome.php file.

>

> it seems i didn't configure it correctly, how can i fix it? thanks
 
Old 10-08-2008, 01:04 PM
"Star Liu"
 
Default how to add a virtual directory in apache with support to php files?

On Wed, Oct 8, 2008 at 8:41 PM, Cassiel <raffaele.morelli@gmail.com> wrote:
> install php modules (If you didn't yet) then add index.php to DirectoryIndex
> in dir.conf module inside /etc/apache2/mods-enabled/
>
>
>>
>> >
>> > then i visit it by http://localhost/php/StarLiu/Welcome.php, but it
>> > pops out the download dialog to download the Welcome.php file.
>> >
>> > it seems i didn't configure it correctly, how can i fix it? thanks
>

thank you, but in fact, the cause is I set the same directory as both
a mono xsp virtual directory and a php virtual directory, while mono
don't allow other handlers to handle it's directory, so i have to
seperate php files and mono aspx pages in their own directories.


--
MY IMs, Welcome to add me as a debian user or a web developer!
(msn) starliu@live.com
(xmpp) minxinjianxin@gmail.com


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 10:45 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org