erlyaws / yaws

Yaws webserver
https://erlyaws.github.io
BSD 3-Clause "New" or "Revised" License
1.28k stars 267 forks source link

How to Start Yaws #308

Closed SumitFlochat closed 7 years ago

SumitFlochat commented 7 years ago

Hi,

I have used following commands :-

  1. apt-get install yaws
  2. yaws (it gives error). =INFO REPORT==== 16-May-2017::14:12:33 === Yaws: Using config file /etc/yaws/yaws.conf

=INFO REPORT==== 16-May-2017::14:12:33 === Yaws: Using global subconfig file /etc/yaws/conf.d/localhost-ssl.conf

=INFO REPORT==== 16-May-2017::14:12:33 === Warning, Skip invalid docroots at line 17 : /usr/share/yaws/www

=ERROR REPORT==== 16-May-2017::14:12:33 === Yaws: bad conf: No valid docroot configured for virthost 'localhost' (port: 8443) terminating

How to fix it ? Can anyone help?

ningzhang commented 7 years ago

Try creating a file with the following content and name the file "yaws.conf":

id = "Test"
logdir = .
<server localhost>
    listen = 0.0.0.0
    port = 8443
    docroot = .
</server>

Then execute:

$yaws --conf yaws.conf

Note that you need a valid "docroot" field in the configuration. In the example above, the current directory is used as the docroot.

SumitFlochat commented 7 years ago

Thank you It worked...

ningzhang commented 7 years ago

Cheers.