Webinoly is just the perfect tool for NGINX experts. Give it a try!
0 votes
662 views
by Talented

For example:

I created a PHP site by

site httpauth.webinoly.tw -php 

and it would produce the directory

/var/www/httpauth.webinoly.tw/htdocs

then, I create a folder under /htdocs like this:

/var/www/httpauth.webinoly.tw/htdocs/folder

Now, I am going to protect "folder" by following command:

httpauth httpauth.webinoly.tw -path=/folder

Then I got : [ERROR] Subfolder parameter not found!

It's weird, per my investigation, following command could reply success

httpauth httpauth.webinoly.tw -path=/htdocs/folder     

This path '/htdocs/folder' was successfully protected!

But this URL not being protect:

https://httpauth.webinoly.tw/folder/

it protected:

https://httpauth.webinoly.tw/htdocs/folder/

That's not my wanted.

1 Answer

0 votes
by Expert

[ERROR] Subfolder parameter not found!

It means that the folder you are trying to protect is inside a subfolder site. If you create a site using the "-subfolder" parameter, then you need to specify this parameter if you want to protect any path inside this subfolder.

sudo site example.com -html -subfolder=/test
sudo httpauth example.com -path=/test/one -subfolder=/test
by Talented

the commend I use is 

site httpauth.webinoly.tw -php 

I didn't use the -subfolder

if I use :

site httpauth3.webinoly.tw -php -subfolder=/htdocs

it will become

/var/www/httpauth3.webinoly.tw/htdocs/htdocs

by Expert
You're asking two different things, the first one is already answered and the second one about the "htdocs" folder, seriously, I think it's not that hard to understand that it's about the public path and not about the server internal path.
by Talented

Sorry, I didn't get it.

First of all, I didn't use the -subfolder parameter to create a site, why I need -subfolder in my httpauth command?

To my original question, I just use following command to create site (no subfolder)

site httpauth.webinoly.tw -php

It would create an empty folder 

/var/www/httpauth.webinoly.tw/htdocs

Now, I created a folder in the /htdocs and would like to protect it by command:

httpauth httpauth.webinoly.tw -path=/folder

Then, the error occurred:

[ERROR] Subfolder parameter not found!

Finally, I got the right command to fulfill my request:

httpauth httpauth.webinoly.tw -path=/folder -subfolder=/folder

It is a little bit confusing. Is that the correct way to protect the folder under /htdocs?

webinoly -version                                                                                                Webinoly version: 1.13.1

Current stack version: 1.5

by Expert

Ok. Now I understand, it will be fixed in the next release v1.13.2.

Thanks for reporting this issue!

As a temporary fix, you can try protecting your folder before its created and it should work as expected.

by Talented
Thanks for your understanding.
Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...