Closed NazgulCoder closed 2 months ago
@NazgulCoder Do the URLs of the requests to your website include file extensions? E.g: /abc/xyz.html
@NazgulCoder Do the URLs of the requests to your website include file extensions?
Hey thanks for the very quick reply
With the other php container (chialab, with mod_php) I can correctly process this URL:
https://test.com/shop/admin - the correct url should be https://test.com/shop/admin.php
With your PHPFPM-Apache when I visit https://test.com/shop/admin it tells me it doesn't find anything at that URL, if I manually force visit https://test.com/shop/admin.php it goes right. However, the rest of the site is already coded and meant to be used with the rewrite conditions above mentioned
@NazgulCoder
Thank you for providing the information. I'll double-check the default Apache settings to make sure I haven't added any dumb thing.
@NazgulCoder
Thank you for providing the information. I'll double-check the default Apache settings to make sure I haven't added any dumb thing.
great thank you very much for your patience :)
For reference if you want to try: https://hub.docker.com/r/chialab/php/ either php-apache 8.0 or 7.4 work fine.
If you want to do some tests on my machine or want the website copy, please let me know
@NazgulCoder I have pushed a patch for this issue.
By the way, all Docker images will be re-built after a few hours. Please be patient and try again later.
@NazgulCoder I have pushed a patch for this issue.
By the way, all Docker images will be re-built after a few hours. Please be patient and try again later.
I'll keep you updated, in 10hours i'll test it again :)
@NazgulCoder By the way, to avoid waiting, you might want to try adding a line at the beginning of your .htaccess file and see if that works.
Options -MultiViews
I tried to pull again your new image but still no luck.
I tried as you said to add to my current .htaccess the
Options -MultiViews
and somehow it did the trick. So in the future if I have other similar issues with url rewrites should I use that rule?
Thanks a lot for your help :)
@NazgulCoder Thank you for the feedback.
I tried to pull again your new image but still no luck.
Have you tried checking the creation date of the Docker image to see if it is indeed the latest one? If you’re using Docker Compose, there’s a possibility that Docker might reuse your old container, so you’ll need to delete the old container, and Docker Compose will create a new one from the latest Docker image.
@NazgulCoder Thank you for the feedback.
I tried to pull again your new image but still no luck.
Have you tried checking the creation date of the Docker image to see if it is indeed the latest one? If you’re using Docker Compose, there’s a possibility that Docker might reuse your old container, so you’ll need to delete the old container, and Docker Compose will create a new one from the latest Docker image.
you were right. I actually recreated the container from portainer but I forgot to tick the re-pull image 😅
I commented Options -MultiViews
from my .htaccess and everything works as expected now
Thank you very much for your precious help, hopefully someone else will benefit from this too
Thank you again for the feedback.
Hello, and thank you for sharing your PHPFPM Apache container, is very useful and easy to setup.
I'm using your 7.4 or 8.0 phpfpm-apache alpine.
I'm encountering few issues with the rewrite mod though.
This .htaccess can be read only partially, I mean, rewrite conditions for the index.php works fine, other php pages don't get rewritten correctly.
In fact, I have another website with this .htaccess that doesn't have any problem at all
Instead, I tried to run chialab php apache (with mod_php instead of PHP-FPM), without any change, and the first .htaccess works without any problem. Maybe is there an apache configuration that I am missing?
Thank you for your precious help in advance :)