WebFaction
Community site: login faq

Hello,

I installed a small Bottlepy application following the instructions at How to Setup a Python Bottle Application? (I didn't put my files inside /htdocs instead I created a directory on the same level)

I would like to serve static files through Apache/nginx and not through Bottle. I created a symbolic link to static-only app and pointed it to /home/username/webapps/mysite/bottleapp/static That didn't do the trick.

My guess is that I have to configure Apache to remove the WSI handler for /static however my knowledge of web servers is very limited.

I tried adding (as per mod_wsgi Configuration Guidelines):

LoadModule alias_module      modules/mod_alias.so
...
Alias /static/ /home/username/webapps/mysite/bottleapp/static/
<Directory /home/username/webapps/mysite/bottleapp/static>
    Order allow,deny
    Allow from all
</Directory>

with no luck. In fact, it yields "Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration"

Alexei

asked 16 Apr '13, 12:39

Alexei
8136
accept rate: 0%


Don't do anything with your Apache config.

Instead, use our control panel to create a "symbolic link to static-only" application, pointing to your /home/username/webapps/mysite/bottleapp/static directory.

Then, use our control panel to add that application to your site, using /static as the URL path.

Hope that helps!

permanent link

answered 16 Apr '13, 12:48

seanf
12.2k41836
accept rate: 37%

Like I said, I already did that. However, I noticed earlier that I mounted the app only on the https website. I added it now in both places and it works. Thank you!

(16 Apr '13, 12:56) Alexei

Ah, sorry that I missed that part of your question! Glad you got it working though :)

(16 Apr '13, 13:00) seanf
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:

×337
×225
×55
×3

question asked: 16 Apr '13, 12:39

question was seen: 3,988 times

last updated: 16 Apr '13, 13:00

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