Author |
|
Zavarzin
Joined: 05 Sep 2015 Posts: 5 Location: Italy
|
Posted: Sat 05 Sep '15 21:12 Post subject: Unable to view php files via web browser |
|
|
Hi there,
I'm trying to configure self-hosted autoresponder by Amazon "Sendy". I have set up everything correctly and previously I got Sendy up and running on a subdomain sendy.domain.com but I decided to change it to mails.domain.com. So I deleted everything related to Sendy and reuploaded and reconfigured back. Also I have disable the mod_security in cPanel as it caused issues with the previous installation.
To properly configure Sendy I need to sync this 2 files with Amazon server:
bounces.php
complaints.php
But the issue is when Sendy folder is named as "mail" I can't just see / find / reach any php files except complaints.php in web browser. Although the files are actually there on the server as I can see them with file manager.
But the weird thing is if I rename the "mails" folder back to "sendy" all the php files are visible in the folder and reachable.
Here are some screenshots:
I'm getting these errors 403 and 404 when I try to reach domain.com/mails/includes/campaigns/bounces.php while I can reach it if I change "mails" to "sendy".
Any suggestions guys?
Thanks
Apache version: 2.2.29
Operating system: linux
Version of php: 5.3.29
Version of mysql: 5.5.45-cll-lve
Indications in the log files:
[Sat Sep 05 15:01:40 2015] [error] [client 2.38.79.244] client denied by server configuration: /home/*******/*******/mails/includes/campaigns/bounces.php |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Tue 08 Sep '15 11:07 Post subject: |
|
|
how did you configure PHP in your apache? |
|
Back to top |
|
Zavarzin
Joined: 05 Sep 2015 Posts: 5 Location: Italy
|
Posted: Tue 08 Sep '15 13:12 Post subject: |
|
|
Within my hosting account I didn't touch anything.
I just uploaded files on the server and followed this guide:
https://sendy.co/get-started
But the weird thing is that even when I upload the same files on my other domain, without even setting up a database, the same thing happes as well. That is if I rename the folder back to "sendy" the php files are visible via browser, but if I give any other name to the folder the php files won't show up.
It makes me think like if mod_security "has remembered" the folder name "sendy" from the previous installation but won't "accept" other folder names. Is it possible? |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Tue 08 Sep '15 21:17 Post subject: |
|
|
probably because there is something in the .htaccess that is specifically configured to /sendy being in the path. |
|
Back to top |
|
Zavarzin
Joined: 05 Sep 2015 Posts: 5 Location: Italy
|
Posted: Tue 08 Sep '15 22:36 Post subject: |
|
|
Here's the .htaccess content that came with Sendy:
Code: | ErrorDocument 404 "[404 error] If you're seeing this error after install, check this FAQ for the fix: https://sendy.co/troubleshooting#404-error"
Options +FollowSymLinks
Options -Multiviews
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^([a-zA-Z0-9-]+)$ $1.php [L]
# Link tracker
RewriteRule ^l/([a-zA-Z0-9/]+)$ l.php?i=$1 [L]
# Open tracker
RewriteRule ^t/([a-zA-Z0-9/]+)$ t.php?i=$1 [L]
# Web version
RewriteRule ^w/([a-zA-Z0-9/]+)$ w.php?i=$1 [L]
# unsubscribe
RewriteRule ^unsubscribe/(.*)$ unsubscribe.php?i=$1 [L]
# subscribe
RewriteRule ^subscribe/(.*)$ subscribe.php?i=$1 [L] |
I'm inexperienced in the things when it comes to code. |
|
Back to top |
|
Zavarzin
Joined: 05 Sep 2015 Posts: 5 Location: Italy
|
Posted: Tue 08 Sep '15 22:43 Post subject: |
|
|
The code I posted above was in original Sendy zip file I've downloaded from Amazon.
Not sure if you meant any other .htaccess from my server? |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Wed 09 Sep '15 20:58 Post subject: |
|
|
no, the one that came with sendy. I don't see anything that would cause a 403 there. These types of soft
ware love to store their locaions internally for creating links, it may be that you changed the physical location on the server but sendy does it's thinks it's trying to link to a place that doesn't exist, but that usually just 404s.
I see this is linux, UGH! It's probably permissions or ownership. James knows plenty about Linux so I'll leave this to him. |
|
Back to top |
|
Zavarzin
Joined: 05 Sep 2015 Posts: 5 Location: Italy
|
Posted: Thu 10 Sep '15 23:21 Post subject: |
|
|
Guys, finally got it solved by my host support.
They have blacklisted php files in the "includes" folder to "prevent hacker attacks".
Now I've asked and they whitelisted those files.
I spent a lot of time discussing with them before posting on this forum but I've hit on an incompetent staf member that has adviced me to use MailChimp to "solve my issue".
Now it's over. Thanks for your time! |
|
Back to top |
|