Re: [PHP] about the absolutely path

2005-06-12 Thread Richard Lynch
Because it's Windows, I had to stop the "DNS Client" service -- Or, at
least, that seemed to help...  Maybe I should start that again and test.

Also, I was dumb enough to not have all my VirtualHost's in /etc/hosts,
only it's Windows so it's c:\windows\system32\drivers\etc\hosts (in *THIS*
versions of Windows, not the other versions, where it's some other
directory.  Sheesh!)

And, finally, for reasons beyond my ken:
NameVirtualHost *:80 was no good, but
NameVirtualHost 127.0.0.1:80 was good.
Go figure.

Got it to work, but it feels more like Voodoo than anything else.

Thanks to all, and apologies for this off-topic post to wrap this up.

Hope it forestalls at least one post somewhere in the future.

Hm.  I wonder if I could put something in ?/hosts to do:
[a-zA-Z0-9-]*  127.0.0.1

In other words, if I try to surf to 'example' (not example.com) then I
just want my local Apache VirtualHost settings to kick in, so I can work
on sites locally, without digging around and changing ?/hosts every time.

On Mon, June 6, 2005 3:43 pm, Jochem Maas said:
> Richard Lynch wrote:
>> On Mon, June 6, 2005 1:54 am, yangshiqi said:
>>
>>>I have a php application (let's call it app A) which is developed
>>>separated
>>>in a test domain name, like http://testa.xxx.com 
>>>/.
>>>
>>>But now I have to move it to another app (called B) using
>>>http://testb.xxx.com  /, and the app A becomes
>>> just
>>>a
>>>subsystem of app B.
>>>
>>>The access url is changed to http://testb.xxx.com/a/.
>>>
>>>Then I meet a problem that the app A 's links, the path and other
>>> elements
>>>in it are set like '/Main.php', '/art/logo.gif' by an absolutely path.
>>>
>>>The app A is very independent and I do not want to disperse it to app B.
>>>
>>>So how can I get this effect: when the user input the url, '
>>>http://testb.xxx.com/a/ ', the app A will work fine?
>>>
>>>Can I just modify some configuration about yapache to fit this
>>>requirement?
>>
>
> maybe you could use the apache ProxyPass directive?
>
> ProxyPass testb.xxx.com/a/ testa.xxx.com
>
> or something like that. (I'm just half-remembering
> a cool post by Rasmus L. so the syntax is probably off)
>
>>
>
> ...
>
>> server with VirtualHost settings.  [He says blithely, never having
>> actually got that to work on his own box...]
>>
>> H, that reminds me...  Does VirtualHost rely on, like, /etc/hosts
>> having hostnames for all those made-up hostnames I use?  I had assumed
>> all
>
> Richard try something like this (obviously add any required stuff like
> DocumentRoot etc.
>
> # you can do allsorts of stuff with the IP definition.
> #NameVirtualHost 213.*:80
> NameVirtualHost *:80
>
> #  _DEFAULT_ - this vhost gets loaded. if nothing else matches
> # -
> 
>  ServerName www.l-i-e.com
>  ServerAlias l-i-e.com
>  DocumentRoot /var/www/l-i-e.com
> 
>
> 
>   ServerName richard.l-i-e.com
>   ServerAlias rlynch.l-i-e.com
>   # stuff
> 
>
> # whats this then!
>
> 
>  # if you create a directory
>  # in /var/webroots/ that
>  # matches the domainname given to apache
>  # then the dir will be served.
>
>  
>  Options ExecCGI +FollowSymLinks
>  
>
>  UseCanonicalName Off
>
>  ServerName %0
>
>  # '%-2+' traps the penultimate and all preceding parts of the FQDN as
> given in the Host: header
>  # but I wasn't having much luck with it.
>  VirtualDocumentRoot /var/webroots/%0
>
>  # some std resources?
>  Alias  /css  /var/webroots/include/css
>  Alias  /js   /var/webroots/include/js
>
>  php_value auto_prepend_file /some/include/file.inc.php
> 
>
>
>> those hostnames were just internal unique markers for httpd.conf with no
>> real-worl meaning...  Was that just silly of me or what?
>
> Richard, I believe you can have apache do lookups on the given names but
> by default its off at least - I never have any problem putting allsorts
> non-existing domains in the vhost confs, as long as your local HOSTS file
> has a
> suitable entry your rolling.
>
> rgds,
> Jochem
>
>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] about the absolutely path

2005-06-08 Thread Richard Lynch
On Mon, June 6, 2005 11:30 pm, Burhan Khalid said:
>> maybe you could use the apache ProxyPass directive?
>>
>> ProxyPass testb.xxx.com/a/ testa.xxx.com
>>
>> or something like that. (I'm just half-remembering
>> a cool post by Rasmus L. so the syntax is probably off)
>>
>
> I've been trying to search for that message for a while.  It talked
> about running php4 and php5 in one Apache instance.

http://marc.theaimsgroup.com/?l=php-general&m=01114830176&w=2


-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] about the absolutely path

2005-06-07 Thread Jason Barnett

http://marc.theaimsgroup.com/?l=php-general&m=111008638014141&w=2

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] about the absolutely path

2005-06-06 Thread Burhan Khalid

Jochem Maas wrote:

Richard Lynch wrote:


On Mon, June 6, 2005 1:54 am, yangshiqi said:


I have a php application (let's call it app A) which is developed
separated
in a test domain name, like http://testa.xxx.com 
/.

But now I have to move it to another app (called B) using
http://testb.xxx.com  /, and the app A becomes 
just

a
subsystem of app B.

The access url is changed to http://testb.xxx.com/a/.

Then I meet a problem that the app A 's links, the path and other 
elements

in it are set like '/Main.php', '/art/logo.gif' by an absolutely path.

The app A is very independent and I do not want to disperse it to app B.

So how can I get this effect: when the user input the url, '
http://testb.xxx.com/a/ ', the app A will work fine?

Can I just modify some configuration about yapache to fit this
requirement?





maybe you could use the apache ProxyPass directive?

ProxyPass testb.xxx.com/a/ testa.xxx.com

or something like that. (I'm just half-remembering
a cool post by Rasmus L. so the syntax is probably off)



I've been trying to search for that message for a while.  It talked 
about running php4 and php5 in one Apache instance.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] about the absolutely path

2005-06-06 Thread Jochem Maas

Richard Lynch wrote:

On Mon, June 6, 2005 1:54 am, yangshiqi said:


I have a php application (let's call it app A) which is developed
separated
in a test domain name, like http://testa.xxx.com 
/.

But now I have to move it to another app (called B) using
http://testb.xxx.com  /, and the app A becomes just
a
subsystem of app B.

The access url is changed to http://testb.xxx.com/a/.

Then I meet a problem that the app A 's links, the path and other elements
in it are set like '/Main.php', '/art/logo.gif' by an absolutely path.

The app A is very independent and I do not want to disperse it to app B.

So how can I get this effect: when the user input the url, '
http://testb.xxx.com/a/ ', the app A will work fine?

Can I just modify some configuration about yapache to fit this
requirement?




maybe you could use the apache ProxyPass directive?

ProxyPass testb.xxx.com/a/ testa.xxx.com

or something like that. (I'm just half-remembering
a cool post by Rasmus L. so the syntax is probably off)





...


server with VirtualHost settings.  [He says blithely, never having
actually got that to work on his own box...]

H, that reminds me...  Does VirtualHost rely on, like, /etc/hosts
having hostnames for all those made-up hostnames I use?  I had assumed all


Richard try something like this (obviously add any required stuff like
DocumentRoot etc.

# you can do allsorts of stuff with the IP definition.
#NameVirtualHost 213.*:80
NameVirtualHost *:80

#  _DEFAULT_ - this vhost gets loaded. if nothing else matches
# -

ServerName www.l-i-e.com
ServerAlias l-i-e.com
DocumentRoot /var/www/l-i-e.com



ServerName richard.l-i-e.com
ServerAlias rlynch.l-i-e.com
# stuff


# whats this then!


# if you create a directory
# in /var/webroots/ that
# matches the domainname given to apache
# then the dir will be served.


Options ExecCGI +FollowSymLinks


UseCanonicalName Off

ServerName %0

# '%-2+' traps the penultimate and all preceding parts of the FQDN as given 
in the Host: header
# but I wasn't having much luck with it.
VirtualDocumentRoot /var/webroots/%0

# some std resources?
Alias  /css  /var/webroots/include/css
Alias  /js   /var/webroots/include/js

php_value auto_prepend_file /some/include/file.inc.php




those hostnames were just internal unique markers for httpd.conf with no
real-worl meaning...  Was that just silly of me or what?


Richard, I believe you can have apache do lookups on the given names but
by default its off at least - I never have any problem putting allsorts
non-existing domains in the vhost confs, as long as your local HOSTS file has a
suitable entry your rolling.

rgds,
Jochem





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] about the absolutely path

2005-06-06 Thread Richard Lynch
On Mon, June 6, 2005 1:54 am, yangshiqi said:
> I have a php application (let's call it app A) which is developed
> separated
> in a test domain name, like http://testa.xxx.com 
> /.
>
> But now I have to move it to another app (called B) using
> http://testb.xxx.com  /, and the app A becomes just
> a
> subsystem of app B.
>
> The access url is changed to http://testb.xxx.com/a/.
>
> Then I meet a problem that the app A 's links, the path and other elements
> in it are set like '/Main.php', '/art/logo.gif' by an absolutely path.
>
> The app A is very independent and I do not want to disperse it to app B.
>
> So how can I get this effect: when the user input the url, '
> http://testb.xxx.com/a/ ', the app A will work fine?
>
> Can I just modify some configuration about yapache to fit this
> requirement?

You could try the BASEHREF tag, but I don't think that ever got
wide-spread browser support, much less W3C status...

mod_rewrite seems like it would be good, but how would you know to use
/a/Foo.html instead of /Foo.html?  I guess you could do it only on
ErrorDocument, but then you'll be stuck if you ever need to have
/c/Foo.html...  Might be worth pursuing.

You could, perhaps, keep all of a on testa.xxx.com, and force B to link to
a.xxx.com rather than really move it.  They can co-exist on the same
server with VirtualHost settings.  [He says blithely, never having
actually got that to work on his own box...]

H, that reminds me...  Does VirtualHost rely on, like, /etc/hosts
having hostnames for all those made-up hostnames I use?  I had assumed all
those hostnames were just internal unique markers for httpd.conf with no
real-worl meaning...  Was that just silly of me or what?

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] about the absolutely path

2005-06-06 Thread yangshiqi
I have a php application (let's call it app A) which is developed separated
in a test domain name, like http://testa.xxx.com  /.

But now I have to move it to another app (called B) using
http://testb.xxx.com  /, and the app A becomes just a
subsystem of app B.

The access url is changed to http://testb.xxx.com/a/.

Then I meet a problem that the app A 's links, the path and other elements
in it are set like '/Main.php', '/art/logo.gif' by an absolutely path.

The app A is very independent and I do not want to disperse it to app B.

So how can I get this effect: when the user input the url, '
http://testb.xxx.com/a/ ', the app A will work fine?

Can I just modify some configuration about yapache to fit this requirement?

 

 

 

 

 

 

 

Best regards,

Yang Shiqi