Publicly expose a directory on Pantheon (Drupal 7) - .htaccess

I have a D7 site on Pantheon with a dir in sites/default/files that I want to make publicly accessible and navigable (you should be able to navigate the folder structure and files from within a web browser - no styling necessary).
I've tried creating a module that displays the contents of the dir on a dynamically created page (using hook_menu) and it works on local but on Pantheon it's blocked (with a generic not found Pantheon error).
Any help is greatly appreciated!

Related

gitlabs copy/paste upload folder

I'm creating a wiki in gitlabs, I copy/pasted an image into a page and it automatically uploaded the image and referenced it like this:
![image](uploads/84329e7811b5d2efb31b764c4767770d/image.png)
How do I access these uploads via the web browser to update or manage them? I've tried the documentation and it just goes on about default physical locations via a shell which I don't have access to (this is a private gitlabs installation).
Also, does anyone know if this is a permanent location or something wiped (e.g. after a server restart).
I've tried all variations of 'uploads' in my url.
thanks.

Creating .htpasswd file outside webpage files

I'm working with a webpage that uses a content management system. The webpage belongs my university. We want create a private file with .htaccess and htpasswd.
The problem is I can't figure out how to place the htpasswd file outside the webpage files because I don't have access to the server machine. I need to do that because someone told me it is unsafe to place it within the webpage files. Any ideas?
If you have a shared hosting account for your website, I suggest you connect to it through FTP. In Directadmin as example, you have to put the file in your public_html folder (which is the root directory of your site).
In case you want to put it outside of the root (as you were asking), place it 1 directory lower (so not in the public_html but before that), and then link it to it.
In case you lack the permissions to do so, contact your hosting provider, cause he should be able to do it for you (and ask him for the direct path).

Coldfusion security issue...how to hide directory of files?

So, I decided to try to break my website...I googled my site by typing in site:mysite.com/whatever and behold, all of the users uploaded files were available for view under a specific directory.
What kind of script/ counter measure should I use to block these files from being viewed? I already have a script that checks the path and the logged in status, however this doesn't seem to be working. I've looked all over for solutions...but I can't quite find one. I'm using ColdFusion 8.
This isn't a ColdFusion issue so much as a web server configuration issue.
You should either:
configure your web server not to show a directory of files when using a URL without a filename (e.g., http://www.example.com/files/)
drop a blank default web document (index.html, index.htm, default.htm, index.cfm, whatever) into that directory so that it displays that document rather than the list of files. If you use index.cfm, it'll fire your Application.cfm/cfc in your file path and use whatever other security you've built.
(or, better, do both)
The best way to secure your file listings and the files themselves is to store them in another folder outside of the Web site root folder. You can then serve them up using CFDIRECTORY and CFCONTENT. The pages that display the files can check your access controls and only serve the files to those allowed to see them.

apex 4.0.1 not working

I recently upgraded to apex 4.0.1
but when I access 127.0.0.1:8080/apex and login it the page doesn't respong
and another thing ... the page is supposed to have some photos but it doesn't appear
so when I view the source code of the page and open any of the JS files / photos directories / css files
I get this
404 Not found
Not found
The requested URL /i/css/apex_4_0.css was not found on this server
I have ubuntu 11.04
There's two steps to the upgrade. The first is (mostly) installing the APEX_040000 objects. The second uploads a bunch of files into the database.
Make sure you carried out the second step correctly as documented
It is two steps because, if you are using the Oracle Apex Listener or HTTP Server then you'd put those files on a file system somewhere, rather than in the database.
It sounds like your config file is messed up in some way. Check the configuration to verify that it is directing traffic on port 8080 to the correct directory. Here is a link to how to find the Apache config file and how to read it:
http://www.unix-girl.com/geeknotes/apache_virtual_host_conf.html
The only other thing I can think of is that the directory does not exist. Maybe it got deleted or moved.

How to setup IIS 7 using physical path directing to DropBox?

I'm using multiple computers for development and I want to be able to store my files in my dropbox folder. I went to change the physical path in IIS from c:\inetpup\wwwroot to the dropbox folder but I get this error:
The requested page cannot be accessed
because the related configuration data
for the page is invalid.
I couldn't find the config file so I was wondering if anyone had done this before or whether there a better way to sync everything nicely across several PCs?
I tried it (IIS 7.5, Win 7) and it should work just fine to let your physical path of your web look at your dropfox folder. I would guess your web.config file generally contains malformed XML (see KB942055).
I'd suggest, try to map it to an empty folder just with an index.html file and see if this error still occurs.
As a workaround, I guess you can put Dropbox in your wwwroot folder and set up a virtual directory that points to Dropbox. However, there are some security issues that may hinder you from doing so. I come across a nice tutorial on how to set up Dropbox to IIS as FTP Publishing. Hope it helps.
Hodgin's guide on using Dropbox as FTP publishing.

Resources