0

My host has hidden files on my node.js webserver (he did this may/june 2013) and can't remember how/what he did...

I need to ask at this point as I have been reading around centos stuff and looking into http.config file and not really seeing anything change when turning things off and on again.

the symptoms:

when you goto mysite.com all you see is index of (no files are shown) but the public_html is full of .js files, folders, an image .png (this is good)

when you go to mysite.com/example.png you get 404 not found (this is bad)

when you go to mysite.com/example.js you get 404 not found (this is good!)

the code in .js files can be accessed just fine by my_client_code_site.com (this is also good!)

any clues as to how this behaviour was achieved?

is this helpful?:

ServerName ${DOM}
ServerAlias www.${DOM}
DocumentRoot ${HOME}/public_html
ErrorLog /var/log/virtualmin/${DOM}_error_log
CustomLog /var/log/virtualmin/${DOM}_access_log combined
ScriptAlias /cgi-bin/ ${HOME}/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory ${HOME}/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
<Directory ${HOME}/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>

UPDATE

More info from my host:

a) only two domains running, files are visible on one domain, not on the other (so whatever rule there is, it's working not server-wide)

b) virtual host config in httpd.conf is identical for both domains (except forIP address and paths, of course)

c) I tried swapping the names of the home dirs with each other (and chown accordingly) and it still does not work (files invisible)

Where else can I look to pinpoint what it could be?

UPDATE: we think it has something to do with the referer

  • Possibly more appropriate on unix.se? So people can answer your question, please show appropriate config files from your httpd. – Andrew Domaszek Sep 21 '13 at 19:37

3 Answers3

1

Have you checked DNS/NS to ensure the domain is going to the correct server? Otherwise, check the vhost configurations again and ensure the document root is correct.

EDIT: have you checked permissions of the files?

Jason
  • 3,931
  • 19
  • 66
  • 107
1

Look at the Apache error-log, or access-log. I'd suggest this might be some mod_rewrite or other .htaccess security.

Perhaps the simplest way to proceed would be to ask the admin who made the change(s) what they did, why they did it, and how to revert.

EDIT: Is your webserver apache, or is it a node.js application? You're not 100% explcit.

1

There may be a .htaccess file in your public_html folder that is preventing access to those files.

deflomu
  • 146
  • 3