Discussion:
bozohttpd: user.domain URL (instead of ~user)
(too old to reply)
Mayuresh
2022-05-01 10:08:28 UTC
Permalink
Is there any way in bozohttpd to redirect a URL of "user.domain" form to a
user specific directory - (just like how domain/~user is).

Best if it generically works for all users, but even if a per user setting
is required it would work for me for now.
--
Mayuresh

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
RVP
2022-05-01 12:22:36 UTC
Permalink
Post by Mayuresh
Is there any way in bozohttpd to redirect a URL of "user.domain" form to
a user specific directory - (just like how domain/~user is).
Will this do: virtual hosting + .bzabsredirect ?

$ tail -n2 /etc/hosts
192.168.68.171 x202e.localdomain x202e
192.168.68.171 rvp.localdomain rvp

$ mkdir ~/public_html
$ mkdir /tmp/www /tmp/vroot
$ cd /tmp/vroot
$ mkdir rvp.localdomain; cd rvp.localdomain
$ ln -sf "http://x202e.localdomain/~rvp" .bzabsredirect

# bozohttpd -f -H -s -u -X -v /tmp/vroot /tmp/www

$ curl -s http://rvp.localdomain/
<html><head><title>Document Moved</title></head>
<body><h1>Document Moved</h1>
This document had moved <a href="http://x202e.localdomain/~rvp">here</a>
</body></html>
$

-RVP


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Mayuresh
2022-05-01 15:25:15 UTC
Permalink
Post by RVP
$ ln -sf "http://x202e.localdomain/~rvp" .bzabsredirect
Thanks for the hint.

I tried the following:

In /var/www/virtual (passed as -v to httpd)

ln -s ~user/public_html user.domain

This seemed to work for URL http://user.domain

I did not need .bzabsredirect

Also moved the main site under /var/www/virtual/domain

Hope this is workable.
--
Mayuresh

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...