I Just installed SSL on my server, I can access to all my folder with and without https.
Now, I put a php file on a folder. I can access to it without https, but when I want to open a secure connexion with httpS I have : 500 Internal Server Error. Only if the content of this folder is a php project, if not (e.g.: html project) it will open very well with https
I have any .htaccess on this folder.
How can I fix that?
Thanks in advance.
This sounds like the Virtual Host directive within the httpd-ssl.conf isn't properly configured to handle PHP files. My guess would be a user/permission issue or the lack of a handler directive that would tell Apache how to handle .php files.
Regards
You have to configure you htaccess properly, by that i mean to get it on.
Related
how to get all request in index.php without any server configuration.
I tried that with .htaccess but I notice some problems,like .htaccess does not work on all server by default, and save configuration does not work in nginx.
How php handle request itself? can we modify that behaviour ?
Is it possible?
If not, any other way available? but without .htaccess. I don't hate server configuration files. But many times users doesn't have access to server settings.
Am trying to use php I downloaded XAMPP control panel v3.2.2set the port to listen at 8080 and I set the localhost to 8080 too and apache starts and runs fine.
The problem is that for any php file that I try to open by writing at my browser:localhost/thefile'sname.php, even though I have saved it in C:\xampp\htdocs, I get the error:HTTP Error 404. The requested resource is not found. Any ideas as to what could be causing this error to occur and how to fix it?
If it can't find the document it's most definitely with your apache config and your document root or possibly a .htaccess file in the document root?
check or post your apache config and check for .htaccess file.
ah also localhost will only map to port 80, http://localhost:8080/yourfile.php
I am trying to create a new domain which runs on SilverStripe 3.0. I am unable to figure out the issue. If I upload a custom php page then it runs fine, but my website is not working. It shows blank page but shows the favico.
If I try to open up www.mydomain.com/admin/, I get the error
Page Not Found
The requested URL /admin/pages was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
This is not a Silverstripe error page. Here is my php info Info
Please let me know if I am missing something or there is any way to figure out the issue.
Try www.yourdomain.com/index.php/admin
If that works then it is because your rewrites are not working. This can be because .htaccess isn't configured properly, or because .htaccess is not used at all (in which case you need to edit your server config).
Last I used Plesk it always used apache. If that is different now and you're using nginx as more than a forward proxy, then you will need to set up the redirects for your site manually.
It does sound like your .htaccess is not being respected. Does Plesk allow overrides for .htaccess in the local directory?
At an apache level we would have something like this stanza to ensure the the .htaccess of the project was respected;
AllowOverride All
If your .htaccess is being processed, make sure that your host has mod_rewrite enabled as that is required to access to pretty URLS.
I have a domain name with OVH but i am hosted on a shared server elsewhere (not very important).
I configured my DNS zones on OVH panel to make my domain name pointing on my server.
.pari-esc.fr A 188.165.201.172
www.pari-esc.fr A 188.165.201.172
redmine.pari-esc.fr A 188.165.201.172
pari-esc.fr and www.pari-escfr are working fine but redmine.pari-esc.fr isn't.
On my shared server admin panel, i configured my subdomain :
Host : redmine
Domain : pari-esc.fr
Redirection Type : L
Path : /redmine/
But when i am trying to access to redmine.pari-esc.fr i have an error :
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator....
More information about this error may be available in the server error
log.
Additionally, a 500 Internal Server Error error was encountered while
trying to use an ErrorDocument to handle the request.
The weird part is when i am trying to access to redmine.pari-esc.fr/index.html, its working... so i am a bit lost...
I thought redmine.pari-esc.fr would automatically find index.html and i don't understand why he is not..
I tried to put a .htaccess with a DirectoryIndex index.html but it didn't resolve my problem...
Maybe there is an other way to configure DNS or subdomain and i did it bad ?
So my purpose is : when i am going to redmine.pari-esc.fr i want to display my index.html located in my /redmine/ directory
Thank you in advance for your help !
The DNS settings are looking ok. Check your path in the server config. /sub/ is an absolute path and that is quite likely not correct. It should be something like /var/www/(your web directory)/sub if it's absolute or simply ../sub/ or sub/ if its relative.
Forbidden
You don't have permission to access /install/step3.php on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Why is it showing this error when I'm trying to install a script?
Your question have 2 configuration problem.
File Permission (in Filesystem)
ErrorDocument Attribute (in Apache Webserver)
First, You can solve permission error using 'chmod' and 'chown' command.
try this:
chmod -R 777 directory (777 means allow permission for all)
chown -R [user]:[group] directory (generally, the same [user] and [group])
Second, ErrorDocument handle error can occured from invaild ErrorDocument attribute setting in .htacess or httpd.conf(or apache2.conf) file.
try this:
check your .htacess file in 'install/' directory. If you can not check this file, you can try 'ls -al' command in terminal. you have to find 'ErrorDocument' attribute, and remove or correct it.
check your apache webserver configuration file (httpd.conf or apache2.conf). If you can check 'ErrorDocument' attribute, you can try remove this attribute in file. It is temporary, so you must backup it before try suggested cases.
If you can not solve by case 1 and 2, you can try disable 'AllowOverride' attribute. Try find 'AllowOverride x' attribute and replace to 'AllowOverride None'. Because, this problem can have possiblity from .htacess file in parent directories. AllowOverride attribute can control allow or deny additional configuration in .htacess file.
You must restart apache service after try this cases. you can try 'service httpd restart' or 'service apache2 restart' command.
Good luck to your web server and you.
First thing to do is check that the index.html is written in properly. Forbidden 403 usually indicates that the server is running but that the requested resource is not being found.
Then clear your cache. Additionally check your php.ini file to configure any necessary items to get your website running.
The Web server (running the Web site) thinks that the HTTP data stream sent by the client (e.g. your Web browser or our CheckUpDown
robot) was correct, but access to the resource identified by the URL
is forbidden for some reason.
This indicates a fundamental access problem, which may be difficult to
resolve because the HTTP protocol allows the Web server to give this
response without providing any reason at all. So the 403 error is
equivalent to a blanket 'NO' by the Web server - with no further
discussion allowed.
By far the most common reason for this error is that directory
browsing is forbidden for the Web site. Most Web sites want you to
navigate using the URLs in the Web pages for that site. They do not
often allow you to browse the file directory structure of the site.
For example try the following URL (then hit the 'Back' button in your
browser to return to this page):
http://www.checkupdown.com/accounts/grpb/B1394343/
This URL should fail with a 403 error saying "Forbidden: You don't
have permission to access /accounts/grpb/B1394343/ on this server".
This is because our CheckUpDown Web site deliberately does not want
you to browse directories - you have to navigate from one specific Web
page to another using the hyperlinks in those Web pages. This is true
for most Web sites on the Internet - their Web server has "Allow
directory browsing" set OFF.
I have faced this problem. On local host it was running as I want, but when deployed (using Filezilla in my case) on the remote server, the problem occurred. with error 403 instead of 404. I think as mentioned before, It is a restricted access from the server. I only reuploaded the whole folder and every thing is perfect now.
Thanks to this community.
.htaccess
ErrorDocument 404 /index.php
ErrorDocument 403 /index.php
ErrorDocument 403.14 /index.php
ErrorDocument 500 /index.php