I created a subdomain in plesk and tried to upload an index.html with some text on it, It renders well.
However, when I tries to upload an index.php with a basic text on it, it shows
Forbidden
You do not have permission to access this document.
The same error that shows when my subdomain folder is empty. At the same time it downloads a file which contains my index.php code.
Anyone have some idea about this? thank you in advance
Related
I have a application know as nexthour cms which I am running using apache2 on ubuntu. I have added all the configuration in apache2 and downloaded all the extensions in php. The nexthour appliaction is based on Laravel. The issue is that there is a server.php file in the root directory. When I ran this file for the first time it went through some steps for installation of the application. Once those steps were done it showed the application but no styling was being shown. The webpage was only showed text when opening server.php file and when I open links like login it takes me to the login page but no styling is applied. When I checked the css file location from source code it shows the path localhost/server.php/css/thecssfile.css but the file is not found.
When I open the public directory all the styling is being applied but the issue here is that it is not able to find the login page when I press login.
When I checked the login page location from server.php file it shows as localhost/server.php/login and it opens fine but still without any styling. Remember that server.php is not a directory it is a php file. Where do I find the login file in the folder as server.php is not a directory?
When I checked the login page location from public/index.php it is localhost/public/login file is not found and I checked the directory and there is no login file or directory.
What should I do in this case? I can not use the server.php file as there is no styling and I can also not use public/index.php as the login page is not found. Please help me out as I a complete noob in laravel or php and this is a application I have downloaded and not developed. Your help will be highly appreciated if someone could let me know whats happening here.
Update: localhost/public/index.php/login works fine but no styling show up here.
Got it all fixed just had to use sudo a2enmod rewrite to resolve this issue.
I was working on my site in php using xampp server. everything was going fine and great. i created the pages styled with css, functionalized with javascript and stored data with mysql. everything gone fine. when i decided to upload it to web server it didn't work well. on the very first page it didn't load css.
In the root directory i have only three files index.php, log-in.php and connect.php. css, js and every other files and folders are located in dashboard folder in root directory.
when i access website it shows the root index.php with no css because css files are in dashboard/ and when i access domain.com/dashboard it says
Not Found
The requested URL was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle
the request.
I changed the files and folders permission on cpanel but that didn't work either.
This is directory structure
root index file
dashboard not accessible
should look like this
I hope somebody has explanation to this problem that why it is occurring and what is the solution.
Thank You...
I have uploaded my .php files into cPanel. lets say my main domain is abcde.com. Then I created a subdomain called gisWeb.
Now in file manager under /home/abcdec I can see a directory called gisWeb.abcde.com. I uploaded an index.html file into this directory and tried to run it by browsing http://gisWeb.abcde.com/index.htmlbut I'm getting site cant reach page. `
We can’t reach this page.
Try this
Make sure that you’ve got the right web address:`
How can I access my files.What should be the url?
Please help me.
Thanks
Problem could be one of these.
1. Sub-Domain you created may not have propagated.
2. You may need to put the files in public_html folder inside gisWeb.abcde.com
Getting this weird error on the server after trying to upload images with size greater than 20k. Images below that size will be uploaded successfully.
What is the problem?
by the way, the configuration in the php.ini is
upload_max_filesize = 96M
post_max_size = 96M
I am using PHP 5.6
Can you help me please ?
There can be several causes for your problem. Please check all points listed here:
The 403 Forbidden error is an HTTP status code which means that
accessing the page or resource you were trying to reach is absolutely
forbidden for some reason.
There are three common causes for this error. Here they are listed from most likely to least likely.
Empty httpdocs directory
Make sure that your website content has been uploaded to the correct directory on your server. Remember to replace example.com with your own domain name.
DV server: /var/www/vhosts/dv-example.com/httpdocs/
When you connect with your FTP user, you just need to navigate into the httpdocs directory.
If this folder does not exist, feel free to create it.
No index page
The home page for your website must be called index.php or index.html.
To resolve this error, upload an index page to your httpdocs directory.
If you already have a home page called something else - home.html for example - you have a couple of options:
Rename your home page to index.html or index.php.
Set up a redirect on the index page to your real home page. See How do I redirect my site using a .htaccess file? for details.
Set a different default home page in your .htaccess file. Javascript Kit has a good example.
If you don't want a single page to display, but instead want to show a list of files in that directory, see Making directories browsable, solving 403 errors.
Permissions and ownership errors
A 403 Forbidden error can also be caused by incorrect ownership or permissions on your web content files and folders.
source: https://mediatemple.net/community/products/dv/204644980/why-am-i-seeing-a-403-forbidden-error-message
I think your problem is the third point. You don't have permissions for an upload.
This link
http://localhost/
works fine.
This link doesn't work
http://localhost/shlingy/
directory location
C:\wamp\www\shlingy\index.html
Does anybody know why this link does not work?
Check whether there is a .htaccess file in www or www/shlingy directory or not. If there is, rename or remove it. Probably a rewrite rule in that file is causing the problem.
Also, make a index.html file in the www/shlingy directory which will be displayed when you access the shlingy.
It was a mistake on my end that i call a constructor of PHP file at the start page but that file contain an error. Its annoying that server just show blank page instead of error Massagining