Unable to change web server root


(Daniele Lolli) #1

Hi there, very new to NethServer (I always have been an Ubuntu fan).
I am trying to set an ibay called “webroot” as the default website page.
But I when I access http://myip/ I get the apache default page.
If I set to access with the folder name I can reach the folder at http://myip/webroot , but this is not what I want to do.
Any hint?


(Filippo Carletti) #2

Not sure, but using the IP address can’t work. You’ll need the hostname:
http://example.org


(Alessio Fattorini) #3

Did you resolve thanks to Filippo’s advice?


(Daniele Lolli) #4

Unfortunately not, even if using a fully qualified host name.
At the moment the only possible solution I can guess would be finding the physical location of the host root, delete it and symlink /var/lib/nethserver/ibay/webroot/ but this would bypass all the web panel functionality and I don’t like this solution.
I wonder if the fact that I don’t have an internal DNS in my LAN is involved in the problem (but I add the testing hosts in lmhosts file of my workstation).


(Filippo Carletti) #5

I’ve at least a couple of webserver in production using a shared folder as webroot.
Here’s the config:

# db accounts show www
www=ibay
    AclRead=
    AclWrite=
    Description=Sito web
    GroupAccess=rw
    HttpAccess=public
    HttpAliasType=root
    HttpCgiBinStatus=enabled
    HttpPasswordStatus=disabled
    HttpPasswordValue={CRYPT}!!
    HttpProfileType=migration
    HttpStatus=enabled
    HttpVirtualHost=www.example.org
    OtherAccess=r
    OwningGroup=webmaster
    SmbProfileType=migration
    SmbRecycleBinStatus=disabled
    SmbStatus=disabled

(Daniele Lolli) #6

Sorry for very noob question: how do I check the config? Via webpanel or
via ssh?


(Filippo Carletti) #7

Type in a shell:

db accounts show <folder_name>

(Daniele Lolli) #8

Here is mine:

`www=ibay
    AclRead=
    AclWrite=
    Description=Sito web
    GroupAccess=rw
    HttpAccess=public
    HttpAliasType=root
    HttpAllowOverrideStatus=disabled
    HttpForceSslStatus=disabled
    HttpPasswordStatus=disabled
    HttpStatus=enabled
    HttpVirtualHost=__ANY__
    OtherAccess=r
    OwningGroup=webmaster
    SmbAuditStatus=enabled
    SmbGuestAccessType=none
    SmbRecycleBinStatus=disabled
    SmbStatus=enabled
`

The only major difference I can see is HttpVirtualHost=ANY

Does this suggest something?


(Vagn Eriksen) #9

Have the same problem. Solved by fiddling with SMBsettings(!!!)
Change in Dashboard or in dB from
SmbGuestAccessType=none to
SmbGuestAccessType=r
Expand template and restart httpd
I have no idea why this is working

Regards, Vagn


(Giacomo Sanchietti) #10

You must create an index file.

For example, if your ibay is named “primary”:

  echo "MY SITE" > /var/lib/nethserver/ibay/primary/index.html