Git Product home page Git Product logo

Comments (7)

fometeo avatar fometeo commented on May 26, 2024

Let me try to explain better the question.
Adding another folder at /etc/weborf.d/joe.conf like this

basedir=/home/joe
use-mime=true
user=joe
group=joe
cachedir=/var/cache/weborf
port=81

works using the server ip at port 81

what I am asking is how to only use port 80 (or 8080 ) and share by weborf as

ip/joe instead of ip:81

from weborf.

ltworf avatar ltworf commented on May 26, 2024

You have to use virtual hosts for that.

They're supported but I haven't used them in a while. Time to write at least a test for them!

from weborf.

ltworf avatar ltworf commented on May 26, 2024

Seems that virtual host thing still works.

from weborf.

fometeo avatar fometeo commented on May 26, 2024

It still seems to me that Weborf always needs to assign a unique port number to each site. From what I read it should be possible to use reverse proxy with Nginx or Apache to distribute the requests to the Weborf instances on each port but that would destroy the beauty of Weborf :-)

So, please, give an example.

from weborf.

ltworf avatar ltworf commented on May 26, 2024

No need to do different ports on different sites.

See for example how it's done in the test

weborf -p 12349 --virtual localhost:12349=site1,127.0.0.1:12349=site2 -b site1

for port 80 you'd do

weborf -p 80 --virtual localhost=site1,127.0.0.1=site2 -b site1

This is already documented.

from weborf.

fometeo avatar fometeo commented on May 26, 2024

Sorry, I tried to understand but was not able to apply to the scenario of 2 users, say fernando and joe, respectively at /home/fernando/ and /home/joe/ at server 192.168.1.2 pretending to display by http://192.168.1.2/fernando and http://192.168.1.2/joe as web ( later it would change to a specific folder )

Documentation does exist, as at these:
https://manpages.ubuntu.com/manpages/bionic/man5/weborf.conf.5.html
https://manpages.ubuntu.com/manpages/bionic/en/man1/weborf.1.html
and implementation has some examples at
/usr/share/doc/weborf/examples/
as
examples/auth.py
examples/weborf_auth.c
examples/xinetd.conf
examples/weborf_auth_dav.c
examples/weborf_auth.service

however I miss the virtual documentation example
one can find on the virtual subject these:

   -V, --virtual
          Enables weborf to use virtualhosts. The  basedir  supplied  with  -b  will  be  the
          default  one  (will  be  used if the requested host is unknown).  Every virtualhost
          must be in the form host[:port]=basedir. The port must be  specified  if  the  port
          used  is  different  than  80.  And the basedir must end with a /. To separate many
          virtualhosts, use a  comma,  and  avoid  spaces.   To  make  weborf  use  different
          virtualhosts  on  different  ports,  it  will  be necessary to launch many weborf's
          processes.

and

virtual
This directive is used to enable virtualhosts. One line is needed for each port.
The format is: virtual#port#domain1=basedir1,domain2=basedir2

However I miss to translate that into an example.

from weborf.

ltworf avatar ltworf commented on May 26, 2024

Aaaah, that's what you want to do.

Just make symlinks inside the root web directory, and make sure that the linked directories are readable from the user that is running weborf.

from weborf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.