WebFaction
Community site: login faq

Hello. I'm generating project documentation using Sphinx. My workflow is to write docs on the local machine and then push it to the hg repo on webfaction account. The compiled static html is located here: /home/myuser/hgrepos/project_name/repo_name/_build/html. Using the control panel I created a link to static-only app that points to that directory. Then I added a website and associated it to the symlink app so that the users always read fresh documentation.

Now I'd like to protect the contents, but it seems that .htaccess is being ignored. The content of /home/myuser/hgrepos/project_name/repo_name/_build/html/.htaccess is:

AuthType Basic
AuthName Docs
AuthUserFile /home/myuser/webapps/app_name/.htpasswd
# ALSO TRIED THIS BUT NOTHING CHANGED:
# AuthUserFile /home/myuser/hgrepos/project_name/repo_name/_build/html/.htpasswd
Require valid-user

<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>

The issue is that the auth window doesn't appear and everyone can read the docs without providing user/pass.

What do I do wrong?

Thanks

asked 14 Oct '11, 03:15

Guandalino
3711218
accept rate: 0%


Hi,

Symbolic link apps are being treated as static-only apps. As the app's doc says when you create one:

"The files within are served by a shared web server process (typically nginx). This application is exclusively static; PHP files and .htaccess files, for example, will not be interpreted."

And that's mostly because they are being served by our nginx frontend which by design doesn't read .htaccess files.

One thing you could do would be to create a Static/CGI/PHP5.3 app, named for example sphinx_html, and create a hook on Mercurial to copy your files there (~/webapps/sphinx_html) after a push.

permanent link

answered 14 Oct '11, 03:41

iliasr ♦♦
2.1k14
accept rate: 35%

Thanks for the nice answer. Now it's clear.

(14 Oct '11, 03:47) Guandalino
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×125
×45
×33
×31
×17

question asked: 14 Oct '11, 03:15

question was seen: 3,344 times

last updated: 14 Oct '11, 03:47

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM