static-files

Connection reset by peer when using s3, boto, django-storage for static files

冷暖自知 提交于 2019-12-09 14:27:25
问题 I'm trying to switch to use amazon s3 to host our static files for our django project. I am using django, boto, django-storage and django-compressor. When I run collect static on my dev server, I get the error socket.error: [Errno 104] Connection reset by peer The size of all of my static files is 74MB, which doesnt seem too large. Has anyone seen this before, or have any debugging tips? Here is the full trace. Traceback (most recent call last): File "./manage.py", line 10, in <module>

Django: static files in a 404 template

耗尽温柔 提交于 2019-12-08 12:04:15
问题 How to include stylesheets and images into a 404 page template using the default view? I created a 404.html file in the root of the site's templates directory: <!DOCTYPE html> <html> <head> {% load static %} <link rel="stylesheet" href="{% get_static_prefix %}css/404.css" /> </head> <body class="page-404"> <p>Not found.</p> </body> </html> Ironically, the 404.css is not found. The 404.css file is located in one of the apps' static directory. The server is manage.py runserver . On every other

aspnet static file access with authentication

浪子不回头ぞ 提交于 2019-12-08 01:22:27
问题 In my application folder I have virtual application QA. There is a folder "help" which contains html and other static files. QA is using form authentication. All files in help folder are accessible without authentication (for example, www.mypage.com/QA/help/test.html). I need to change this so that if user acces files in help folder (html files or any other static files) then user is redirecet to login page. I was googling and the ony thing I have found is that this is something with Static

Static files served by node.js on heroku - is it a good idea? [closed]

好久不见. 提交于 2019-12-08 00:51:31
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 months ago . I have Backbone powered single page app. App consists of couple of files: index.html javascripts/app.js javascripts/vendor.js stylesheets/app.css images/ -> image assets I want to add prerender.io service to my app to make it SEO-friendly. The easiest way of doing this for me is to use express.js hosted on

Configure IIS7 to server static content through ASP.NET Runtime

风格不统一 提交于 2019-12-07 11:21:03
问题 I searched high an low and still cannot find a definite answer. How do I configure IIS 7.0 or a Web Application in IIS so that ASP.NET Runtime will handle all requests -- including ones to static files like *.js , *.gif , etc? What I'm trying to do is as follows. We have kind of SaaSy site, which we can "brand" for every customer. "Branding" means developing a custom master page and using a bunch of *.css and other images. Quite naturally, I'm using VirtualPathProvider , which operates like

Defining CharSet for static HTML files

狂风中的少年 提交于 2019-12-07 07:04:56
问题 I just tried several times to define character set for static files served from Google App Engine and failed miserably. File does contain correct meta-equiv tag in header section of file: <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> But it's not being passed as header, browser needs to pick it up from the actual document. Naturally if I use script (or Python Google App Engine program) then I can get it delivered correctly as response header. Content-Type: text/html;

Check for a static file during Application_BeginRequest?

帅比萌擦擦* 提交于 2019-12-07 03:22:38
问题 I have a Global.asx file that needs to do custom authentication, auditing and profiling stuff. This is needed because it supports a SAML based SSO system and needs to override the normal .Net authentication (which doesn't support either SAML or mixed authentication) I don't want to fire it for static files, such as .js , .css , .png , etc In Cassini/WebDev and IIS7 it does. What I want to have is some simple check, like a this.Request.IsStaticFile (which doesn't exist, unfortunately) to

aspnet static file access with authentication

白昼怎懂夜的黑 提交于 2019-12-06 08:16:01
In my application folder I have virtual application QA. There is a folder "help" which contains html and other static files. QA is using form authentication. All files in help folder are accessible without authentication (for example, www.mypage.com/QA/help/test.html). I need to change this so that if user acces files in help folder (html files or any other static files) then user is redirecet to login page. I was googling and the ony thing I have found is that this is something with Static file handling and mapping to asp. I am using IIS 6. I have tried to add line like this < add name=

ASP.NET Core - serving static files [duplicate]

喜夏-厌秋 提交于 2019-12-06 06:11:14
问题 This question already has answers here : .NET Core changing the location where my default index.html file is (2 answers) Closed last year . I'm following this documentation but I'm getting stuck: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/static-files Consider my directory structure: wwwroot dist index.html In my startup class, I have: public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app

How can Tornado serve a single static file at an arbitrary location?

狂风中的少年 提交于 2019-12-05 19:32:33
问题 I am developing a simple web app with Tornado. It serves some dynamic files and some static ones. The dynamic ones are not a problem, but I am having trouble serving a static file. What I am looking to do is to serve the file /path/to/foo.json when the /foo.json URL is accessed. Note that /path/to/foo.json is outside the document root. In Apache I would just set up an Alias. With Tornado I have: app = tornado.web.Application([ (r'/dynamic\.html', MyService, dict(param = 12345)), (r'/(foo\