 |
|
 |
|
Next: apache2 - no access - Directory index forbidden b..
|
| Author |
Message |
External

Since: Feb 24, 2004 Posts: 6
|
(Msg. 1) Posted: Tue Feb 24, 2004 10:04 am
Post subject: Virtual host? Alias? Linux/Windows/Apache dev servers problem. Archived from groups: alt>apache>configuration (more info?)
|
|
|
I'm maintaining a bunch of websites in ASP/PHP/ColdFusion, etc. (I love the
syntactic punishment  . I have two dev servers: an XP/IIS box for
ASP/ColdFusion, and a Redhat/Apache box for PHP, both behind a router
sharing files. Currently I must port forward my router manually to either
the XP or Linux box (hassle). Can I forward a /win folder from the Apache
server to the XP/IIS server? Tried numerous times to configure Virtual Hosts
under Apache and failed miserably. Alias /win/ "//winserver/winshare/"
failed (last-ditch attempt to set up a virtual directory like under IIS).
Any help would be greatly appreciated. >> Stay informed about: Virtual host? Alias? Linux/Windows/Apache dev servers prob.. |
|
| Back to top |
|
 |  |
External

Since: Jun 28, 2003 Posts: 203
|
(Msg. 2) Posted: Tue Feb 24, 2004 10:44 am
Post subject: Re: Virtual host? Alias? Linux/Windows/Apache dev servers problem. [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"D" <darkohrgovic RemoveThis @hotmail.com> wrote in message
news:OHC_b.37065$n17.7811@clgrps13...
> I'm maintaining a bunch of websites in ASP/PHP/ColdFusion, etc. (I love
the
> syntactic punishment . I have two dev servers: an XP/IIS box for
> ASP/ColdFusion, and a Redhat/Apache box for PHP, both behind a router
> sharing files. Currently I must port forward my router manually to either
> the XP or Linux box (hassle). Can I forward a /win folder from the Apache
> server to the XP/IIS server? Tried numerous times to configure Virtual
Hosts
> under Apache and failed miserably. Alias /win/ "//winserver/winshare/"
> failed (last-ditch attempt to set up a virtual directory like under IIS).
Try adding mod_proxy and mod_proxy_http modules, and this line to your
config:
ProxyPass /win/ <a style='text-decoration: underline;' href="http://winserver/" target="_blank">http://winserver/</a>
You can add this to it's own virtual host if you like, then you can use it
under /, rather than /win.
Richard.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Virtual host? Alias? Linux/Windows/Apache dev servers prob.. |
|
| Back to top |
|
 |  |
External

Since: Feb 24, 2004 Posts: 6
|
(Msg. 3) Posted: Wed Feb 25, 2004 12:29 pm
Post subject: Re: Virtual host? Alias? Linux/Windows/Apache dev servers problem. [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Sorry, relatively new to Linux. Using Redhat 9, I can "locate" mod_proxy.so
and mod_proxy_http.so I'm assuming they're installed by default with httpd
uncomment a few lines in Redhat's auto-generated httpd.conf <snip>
<IfModule mod_proxy.c>
ProxyRequests On
ProxyPass /win/ <a style='text-decoration: underline;' href="http://www.netscape.com" target="_blank">http://www.netscape.com</a>
</IfModule>
restart httpd
<a style='text-decoration: underline;' href="http://localhost/win" target="_blank">http://localhost/win</a> results in "requested URL /win was not found on this
server"
Shouldn't this work?
"Richard Antony Burton" <richardaburton-NOSPAM-.DeleteThis@hotmail.com> wrote in
message news:lhD_b.9079493$Id.1512184@news.easynews.com...
>
> "D" <darkohrgovic.DeleteThis@hotmail.com> wrote in message
> news:OHC_b.37065$n17.7811@clgrps13...
> > I'm maintaining a bunch of websites in ASP/PHP/ColdFusion, etc. (I love
> the
> > syntactic punishment . I have two dev servers: an XP/IIS box for
> > ASP/ColdFusion, and a Redhat/Apache box for PHP, both behind a router
> > sharing files. Currently I must port forward my router manually to
either
> > the XP or Linux box (hassle). Can I forward a /win folder from the
Apache
> > server to the XP/IIS server? Tried numerous times to configure Virtual
> Hosts
> > under Apache and failed miserably. Alias /win/ "//winserver/winshare/"
> > failed (last-ditch attempt to set up a virtual directory like under
IIS).
>
> Try adding mod_proxy and mod_proxy_http modules, and this line to your
> config:
>
<font color=purple> > ProxyPass /win/ <a style='text-decoration: underline;' href="http://winserver/</font" target="_blank">http://winserver/</font</a>>
>
> You can add this to it's own virtual host if you like, then you can use it
> under /, rather than /win.
>
> Richard.
>
><!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Virtual host? Alias? Linux/Windows/Apache dev servers prob.. |
|
| Back to top |
|
 |  |
External

Since: Jun 28, 2003 Posts: 203
|
(Msg. 4) Posted: Wed Feb 25, 2004 1:13 pm
Post subject: Re: Virtual host? Alias? Linux/Windows/Apache dev servers problem. [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"D" <darkohrgovic.TakeThisOut@hotmail.com> wrote in message
news:VVZ_b.40101$D_5.17023@edtnps84...
> uncomment a few lines in Redhat's auto-generated httpd.conf <snip>
> <IfModule mod_proxy.c>
> ProxyRequests On
<font color=purple> > ProxyPass /win/ <a style='text-decoration: underline;' href="http://www.netscape.com</font" target="_blank">http://www.netscape.com</font</a>>
> </IfModule>
Did you uncomment the load module statments for these two modules? Try
removing the <IfModule> tags. Then you will know the modules have been
loaded, because if they haven't it will barf on the proxy config directives.
Next, remove ProxyRequests directive, else you have probably just made
yourself an open proxy (bad plan).
> <a style='text-decoration: underline;' href="http://localhost/win" target="_blank">http://localhost/win</a> results in "requested URL /win was not found on this
> server"
All you need is that one ProxyPass line and you should be fine. You may need
to specify <a style='text-decoration: underline;' href="http://localhost/win/" target="_blank">http://localhost/win/</a> (note the trailing slash) in order to get
it to match the ProxyPass directive.
Richard.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Virtual host? Alias? Linux/Windows/Apache dev servers prob.. |
|
| Back to top |
|
 |  |
External

Since: Feb 24, 2004 Posts: 6
|
(Msg. 5) Posted: Wed Feb 25, 2004 8:25 pm
Post subject: Re: Virtual host? Alias? Linux/Windows/Apache dev servers problem. [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Thanks for all your help, Richard. Yes, duh, open proxy bad.
httpd conf did barf on the proxy directive, so at the top of the httpd.conf
I added these two lines and it doesn't barf anymore (I've read that these
directives can go in a separate conf file, but does it matter?):
loadmodule proxy_module /usr/lib/httpd/modules/mod_proxy.so
loadmodule proxy_module /usr/lib/httpd/modules/mod_proxy_http.so
Now when I <a style='text-decoration: underline;' href="http://localhost/win/" target="_blank">http://localhost/win/</a> I get
Error 403
Forbidden
You don't have permission to access /win/ on this server.
Do you think it's working, except for permissions? If so, what's the safest
way to set proxy permissions? If not, see anything wrong with the new
config?
Again, thanks much,
D
"Richard Antony Burton" <richardaburton-NOSPAM- RemoveThis @hotmail.com> wrote in
message news:az__b.1099604$9p3.205420@news.easynews.com...
>
> "D" <darkohrgovic RemoveThis @hotmail.com> wrote in message
> news:VVZ_b.40101$D_5.17023@edtnps84...
>
> > uncomment a few lines in Redhat's auto-generated httpd.conf <snip>
> > <IfModule mod_proxy.c>
> > ProxyRequests On
<font color=green> > > ProxyPass /win/ <a style='text-decoration: underline;' href="http://www.netscape.com</font" target="_blank">http://www.netscape.com</font</a>>
> > </IfModule>
>
> Did you uncomment the load module statments for these two modules? Try
> removing the <IfModule> tags. Then you will know the modules have been
> loaded, because if they haven't it will barf on the proxy config
directives.
>
> Next, remove ProxyRequests directive, else you have probably just made
> yourself an open proxy (bad plan).
>
> > <a style='text-decoration: underline;' href="http://localhost/win" target="_blank">http://localhost/win</a> results in "requested URL /win was not found on
this
> > server"
>
> All you need is that one ProxyPass line and you should be fine. You may
need
> to specify <a style='text-decoration: underline;' href="http://localhost/win/" target="_blank">http://localhost/win/</a> (note the trailing slash) in order to get
> it to match the ProxyPass directive.
>
>
> Richard.
>
><!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Virtual host? Alias? Linux/Windows/Apache dev servers prob.. |
|
| Back to top |
|
 |  |
External

Since: Jun 28, 2003 Posts: 203
|
(Msg. 6) Posted: Wed Feb 25, 2004 9:34 pm
Post subject: Re: Virtual host? Alias? Linux/Windows/Apache dev servers problem. [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"D" <darkohrgovic.DeleteThis@hotmail.com> wrote in message
news:aU4%b.71013$Hy3.38572@edtnps89...
> I've read that these
> directives can go in a separate conf file, but does it matter?
No, there really isn't much point in putting these separate.
> loadmodule proxy_module /usr/lib/httpd/modules/mod_proxy.so
> loadmodule proxy_module /usr/lib/httpd/modules/mod_proxy_http.so
That second one should be:
LoadModule proxy_http_module modules/mod_proxy_http.so
> Now when I <a style='text-decoration: underline;' href="http://localhost/win/" target="_blank">http://localhost/win/</a> I get
> Error 403
> Forbidden
> You don't have permission to access /win/ on this server.
Check your logs, maybe more of a clue. Or maybe it is that http requests are
not allowed as there is no http handler module installed (i.e. check the
LoadModule mentioned line above).
Richard.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Virtual host? Alias? Linux/Windows/Apache dev servers prob.. |
|
| Back to top |
|
 |  |
External

Since: Feb 24, 2004 Posts: 6
|
(Msg. 7) Posted: Wed Feb 25, 2004 9:57 pm
Post subject: Re: Virtual host? Alias? Linux/Windows/Apache dev servers problem. [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Thanks again, Richard. I discoverd the proxy_http_module syntax a few hours
ago. So now it's working except for a major stumbling block:
The linux box now recieves http requests. I've set it to proxy /win/ to
<a style='text-decoration: underline;' href="http://192.168.1.xxx" target="_blank">http://192.168.1.xxx</a> (my XP/IIS box on the lan). Relative paths on the
XP/IIS pages cease to work eg. "images/back.gif" can't be found. If I
redirect to netscape, it works fine because they use absolute paths.
What I need is for Apache to hand over everything to the XP/IIS box.
Possible?
D
"Richard Antony Burton" <richardaburton-NOSPAM-.DeleteThis@hotmail.com> wrote in
message news:eV5%b.1129904$9p3.211962@news.easynews.com...
>
> "D" <darkohrgovic.DeleteThis@hotmail.com> wrote in message
> news:aU4%b.71013$Hy3.38572@edtnps89...
> > I've read that these
> > directives can go in a separate conf file, but does it matter?
>
> No, there really isn't much point in putting these separate.
>
> > loadmodule proxy_module /usr/lib/httpd/modules/mod_proxy.so
> > loadmodule proxy_module /usr/lib/httpd/modules/mod_proxy_http.so
>
> That second one should be:
> LoadModule proxy_http_module modules/mod_proxy_http.so
>
> > Now when I <a style='text-decoration: underline;' href="http://localhost/win/" target="_blank">http://localhost/win/</a> I get
> > Error 403
> > Forbidden
> > You don't have permission to access /win/ on this server.
>
> Check your logs, maybe more of a clue. Or maybe it is that http requests
are
> not allowed as there is no http handler module installed (i.e. check the
> LoadModule mentioned line above).
>
> Richard.
>
><!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Virtual host? Alias? Linux/Windows/Apache dev servers prob.. |
|
| Back to top |
|
 |  |
External

Since: Feb 24, 2004 Posts: 6
|
(Msg. 8) Posted: Thu Feb 26, 2004 7:11 am
Post subject: Re: Virtual host? Alias? Linux/Windows/Apache dev servers problem. [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
What a wild goose chase: just solved the problem by simply setting IIS on
port 8080 and having the router port forward external 80 requests to
internal 8080.
Thanks for all the help anyway,
D
"D" <darkohrgovic RemoveThis @hotmail.com> wrote in message
news:OHC_b.37065$n17.7811@clgrps13...
> I'm maintaining a bunch of websites in ASP/PHP/ColdFusion, etc. (I love
the
> syntactic punishment . I have two dev servers: an XP/IIS box for
> ASP/ColdFusion, and a Redhat/Apache box for PHP, both behind a router
> sharing files. Currently I must port forward my router manually to either
> the XP or Linux box (hassle). Can I forward a /win folder from the Apache
> server to the XP/IIS server? Tried numerous times to configure Virtual
Hosts
> under Apache and failed miserably. Alias /win/ "//winserver/winshare/"
> failed (last-ditch attempt to set up a virtual directory like under IIS).
>
> Any help would be greatly appreciated.
>
>
>
><!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Virtual host? Alias? Linux/Windows/Apache dev servers prob.. |
|
| Back to top |
|
 |  |
External

Since: Jun 28, 2003 Posts: 203
|
(Msg. 9) Posted: Thu Feb 26, 2004 12:49 pm
Post subject: Re: Virtual host? Alias? Linux/Windows/Apache dev servers problem. [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"D" <darkohrgovic RemoveThis @hotmail.com> wrote in message
news:zle%b.41172$D_5.23224@edtnps84...
> What a wild goose chase: just solved the problem by simply setting IIS on
> port 8080 and having the router port forward external 80 requests to
> internal 8080.
Doesn't that still only leave one server available at a time - which ever
one you have forwarded you external port 80 too? Now you have external port
80 going to IIS on 8080, how do you get to apache?
Anyway, just using two ports is probably the easiest way to do this, for
some reaosn I assumed this wasn't an option for you, (e.g. because you
wanted to use both servers together transparently, so only on port 80).
Richard.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Virtual host? Alias? Linux/Windows/Apache dev servers prob.. |
|
| Back to top |
|
 |  |
External

Since: Feb 24, 2004 Posts: 6
|
(Msg. 10) Posted: Sat Feb 28, 2004 2:51 am
Post subject: Re: Virtual host? Alias? Linux/Windows/Apache dev servers problem. [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Richard Antony Burton" <richardaburton-NOSPAM-.RemoveThis@hotmail.com> wrote in
message news:sij%b.9343977$Of.1540832@news.easynews.com...
>
> "D" <darkohrgovic.RemoveThis@hotmail.com> wrote in message
> news:zle%b.41172$D_5.23224@edtnps84...
> > What a wild goose chase: just solved the problem by simply setting IIS
on
> > port 8080 and having the router port forward external 80 requests to
> > internal 8080.
>
> Doesn't that still only leave one server available at a time - which ever
> one you have forwarded you external port 80 too? Now you have external
port
> 80 going to IIS on 8080, how do you get to apache?
>
> Anyway, just using two ports is probably the easiest way to do this, for
> some reaosn I assumed this wasn't an option for you, (e.g. because you
> wanted to use both servers together transparently, so only on port 80).
>
> Richard.
>
>
Sorry, I mispoke: 8080 requests are forwarded to IIS
Not pretty, but <a style='text-decoration: underline;' href="http://www.whatever.com:8080/myiisdevfolder" target="_blank">http://www.whatever.com:8080/myiisdevfolder</a> points to a
directory on IIS, wherease <a style='text-decoration: underline;' href="http://www.whatever.com/mylinuxdevfolder" target="_blank">www.whatever.com/mylinuxdevfolder</a> points to
Apache. For any audience members, you can't leave out the <a style='text-decoration: underline;' href="http://" target="_blank">http://</a> for the
8080 request.
These are only test servers, so I'm not concerned with friendly URL's. Now
that I understand the proxy process a bit better, I'll experiment with the
more subtle alternative that you've been helping me with.
Thanks again,
D<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Virtual host? Alias? Linux/Windows/Apache dev servers prob.. |
|
| Back to top |
|
 |  |
| Related Topics: | Apache on Linux and Tomcat in Windows - Hello, my problem is to configure a apache webserver so, that it is using a tomcat servlet engine, that runs on an other machine wihich has windows as its os. Apache by itself runs under linux. Can anyone please help me. I am an newbie in this sector bu...
Apache virtual servers and DNS2GO - I have three virtual servers set up to the web pages for my three domains. I am using DNS2GO dynamic nameserver to point to my IP. I have been running two of the virtual servers for a long time with no problem. A couple days ago I added the third, but....
Apache Sendmail prob - When Apache sends mail (linux sendmail) via a web form, the return address used is linux@localhost... here is my prob.. localhost is not a real address and my ISP blocks it as localhost has no MX record for localhost Can i force Apache to use the..
Virtual host help apache 1.3 and freeBSD - I have been trying to get the virtual host working on my server so far When I type in the browser www.myshaft.com I get "Cannot find server" messagebut when I type any of the IPs' I get the Apache confimation page too display, this is all I hav...
Apache Name-based Virtual Host SSL - i want to set Virtual Host SSL now i can set Basic Virtual Host not SSL like www.123.com and www.456.com but i want to set https://www.123.com and https://www.456.com too . How can i do sir ? note : i has 1 ip address on 1 server computer . thank u... |
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
 |
|
|