On Thursday, 19 March 2020 17:53:53 GMT J. Roeleveld wrote: > On 19 March 2020 18:19:38 CET, Peter Humphrey <pe...@prh.myzen.co.uk> wrote: > >Hello list, > > > >I want to set up a web server on a local box, and I'm following the > >Gentoo > >guide[1]. I'd like two sites: one under /var/www/localhost and the > >other under > >/var/www/mydomain, in which mydomain is registered to me. > > > >The main problem I'm having is that all the Gentoo documents I've found > >assume > >far too much familiarity with apache. I've installed NextCloud using > >webapp- > >config; this is the layout: > > > >$ tree -L 3 /var/www > >/var/www > >├── localhost > >│ └── htdocs > >│ ├── fcgid-bin > >│ ├── index.orig > >│ └── index.php > >└── mydomain > > > > ├── cgi-bin > > ├── error > > ├── htdocs > > │ ├── cloud > > │ ├── fcgid-bin > > │ ├── index.orig > > │ └── index.php > > └── icons > > > >Is this a suitable layout? Once I get past this I may be asking for > >help with /etc/apache2/vhosts.d/* .
There is nothing wrong with your layout. It is easier to have the webroot of multiple domains hosted under /var/www, each in their respective directory; e.g. /var/www/mydomain1/htdocs/ /var/www/mydomain2/htdocs/ ... /var/www/mydomain-n/htdocs/ and leave /var/www/localhost/htdocs as the default catch-all apache webpage to be served for testing purposes. Then set separate configuration files (/etc/apache2/vhosts.d/* and /etc/ apache2/modules.d/*) for each domain, which you can easily clone/copy thereafter. > Is there a specific reason you are using Apache? > I found it far simpler to use Nginx when dealing with different websites, > incl. seperate SSL certificates per site even though it is 1 server and > public IP. > > -- > Joost nginx has a smaller footprint and it is faster than apache, especially when serving static websites. I understand NextCloud works with WebDAV and nginx also comes with WebDAV modules to allow this functionality. For low user numbers either will do, but if we're talking about a home grown embedded device acting as the server I would lean towards nginx or other light-footed servers.
signature.asc
Description: This is a digitally signed message part.