Title: Work with Caddy web server?
Last modified: February 12, 2021

---

# Work with Caddy web server?

 *  [prototype2](https://wordpress.org/support/users/prototype2/)
 * (@prototype2)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/work-with-caddy-web-server/)
 * It appear Phastpress is not compatible with Caddy web server?
    Nginx + WP 5.6.1
   + PHP 7.4 are working fine in my test on Ubuntu Server 20.04.
 * Will need your help to test and support it.
    -  This topic was modified 5 years, 6 months ago by [prototype2](https://wordpress.org/support/users/prototype2/).

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/work-with-caddy-web-server/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/work-with-caddy-web-server/page/2/?output_format=md)

 *  Plugin Author [Albert Peschar](https://wordpress.org/support/users/kiboit/)
 * (@kiboit)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/work-with-caddy-web-server/#post-14059475)
 * Hi [@prototype2](https://wordpress.org/support/users/prototype2/),
 * I’ve tested with Caddy, and it seems to work fine. What errors are you seeing
   exactly?
 * This is my configuration:
 * [https://github.com/apeschar/wordpress-on-caddy-test](https://github.com/apeschar/wordpress-on-caddy-test)
 * –Albert
 *  Thread Starter [prototype2](https://wordpress.org/support/users/prototype2/)
 * (@prototype2)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/work-with-caddy-web-server/#post-14068734)
 * I have the tested and the problem with php-fpm. Does it work for you?
 * :8080 {
    root * /var/www/html/wordpress php_fastcgi unix//run/php/php7.4-fpm.
   sock file_server }
 *  Thread Starter [prototype2](https://wordpress.org/support/users/prototype2/)
 * (@prototype2)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/work-with-caddy-web-server/#post-14068744)
 * I have assuming Caddy’s fcgi does not accept URL as parameter and redirect to
   the index URL address.
 *  Plugin Author [Albert Peschar](https://wordpress.org/support/users/kiboit/)
 * (@kiboit)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/work-with-caddy-web-server/#post-14070184)
 * Hi [@prototype2](https://wordpress.org/support/users/prototype2/),
 * What do you see when you visit `yourdomain.com/wp-config.php`?
 * What do you see when you visit `yourdomain.com/wp-content/plugins/phastpress/
   phast.php`?
 * Normally, both should show you a blank (white) screen.
 * –Albert
 *  Thread Starter [prototype2](https://wordpress.org/support/users/prototype2/)
 * (@prototype2)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/work-with-caddy-web-server/#post-14074787)
 * Return blank page which is correct
    [http://domain/wp-config.php](http://domain/wp-config.php)
 * Return 404
    [http://domain/wp-content/plugins/phastpress/phast.php](http://domain/wp-content/plugins/phastpress/phast.php)
 * It may look like some configuration issue with Caddy or WordPress for plugins
   folder?
 *  Plugin Author [Albert Peschar](https://wordpress.org/support/users/kiboit/)
 * (@kiboit)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/work-with-caddy-web-server/#post-14075478)
 * Hi [@prototype2](https://wordpress.org/support/users/prototype2/),
 * Yeah, that sounds like it doesn’t have to do with PhastPress specifically, but
   Caddy just can’t reach PHP files inside your plugins folder.
 * You could add a few files called `test.php` inside `wp-content`, `wp-content/
   plugins` and `wp-content/plugins/phastpress`, to see if you can reach those.
 * –Albert
 *  Thread Starter [prototype2](https://wordpress.org/support/users/prototype2/)
 * (@prototype2)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/work-with-caddy-web-server/#post-14076977)
 * Added test.php to each folders, I can echo string on the web browser:
    wp-content/
   wp-content/plugins/ wp-content/plugins/phastpress/
 * I could even access readme.txt in this folder:
    wp-content/plugins/phastpress/
   readme.txt
 * Then I have tried to replace phast.php with readme.txt and it still load readme.
   txt, not redirect to any page.
    [http://192.168.64.5:8080/wp-content/plugins/phastpress/readme.txt?service=&#8230](http://192.168.64.5:8080/wp-content/plugins/phastpress/readme.txt?service=&#8230);
 * I think I have manage to narrow down to phast.php itself?
 *  Thread Starter [prototype2](https://wordpress.org/support/users/prototype2/)
 * (@prototype2)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/work-with-caddy-web-server/#post-14076980)
 * For one more test, test.php echo string in my test correctly, not redirect to
   any page:
    [http://192.168.64.5:8080/wp-content/plugins/phastpress/test.php?service=images&#8230](http://192.168.64.5:8080/wp-content/plugins/phastpress/test.php?service=images&#8230);
 *  Plugin Author [Albert Peschar](https://wordpress.org/support/users/kiboit/)
 * (@kiboit)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/work-with-caddy-web-server/#post-14083407)
 * Hi [@prototype2](https://wordpress.org/support/users/prototype2/),
 * Maybe it has something to do with the permissions or ownership on the file `phast.
   php`. Are they identical to your `test.php`?
 * You could try copying `phast.php` to `phast2.php`, and seeing if that works.
 * If it does, rename the old `phast.php` to `phast.php.bak` and then rename `phast2.
   php` to `phast.php`. Do you get the same 404 or does it work now?
 * If it still doesn’t work, try deleting the `.htaccess` file in this folder. Although
   that shouldn’t make a difference since you’re using Caddy.
 * –Albert
 *  Thread Starter [prototype2](https://wordpress.org/support/users/prototype2/)
 * (@prototype2)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/work-with-caddy-web-server/#post-14084723)
 * I don’t have .htaccess in any of WordPress subfolders including Phastpress.
 * 1) test.php
    Echo Hello string.
 * 2) Copy `phast.php` and paste as `phast2.php`, rename `phast.php` to `phast.php.
   bak` and rename phast2.php to `phast.php`
    Still error 404.
 * 3) phast3.php and test.php are identical.
    Copy phast.php source code, paste 
   into the new `phast3.php` and access URL to that file directly. Still error 404,
   not blank page.
 * 4) Access URL directly to ../wp-content/plugins/phastpress/low-php-version.php
   
   Return code 200, blank plage.
 * 4) chmod 755 phast3.php and access URL to that file directly.
    Still error 404.
 * 5) Commented out code in phast.php
    // phastpress_get_service_sdk()->getServiceAPI()-
   >serve(); Shown blank page which is correct.
 * It seem the sdk need to be debug.
 *  Plugin Author [Albert Peschar](https://wordpress.org/support/users/kiboit/)
 * (@kiboit)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/work-with-caddy-web-server/#post-14085536)
 * Hi [@prototype2](https://wordpress.org/support/users/prototype2/),
 * Thanks for the details. I’m surprise you get a 404 error instead of something
   else. Are there any errors in your server log or wp-content/debug.log (if you
   have it enabled)?
 * I’ve tested with Caddy myself and cannot reproduce the issue. But perhaps there
   is some difference in the setup. Could you share more info about your setup? 
   The best thing would be if you could reproduce the problem using a Dockerfile
   or docker-compose setup. That would make it easy for me to test.
 * –Albert
 *  Thread Starter [prototype2](https://wordpress.org/support/users/prototype2/)
 * (@prototype2)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/work-with-caddy-web-server/#post-14087722)
 * I can reproduce on VPS on Ubuntu Server 20.04.
 * What PHP extension and other packages are require in your setup? I use the easiest
   steps and install the minimum PHP packages to get WordPress working and perhaps,
   might missed out some packages that need for PhastPress to work.
 *  Plugin Author [Albert Peschar](https://wordpress.org/support/users/kiboit/)
 * (@kiboit)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/work-with-caddy-web-server/#post-14095052)
 * Hi [@prototype2](https://wordpress.org/support/users/prototype2/),
 * No additional PHP extensions are required beyond those used by WordPress.
 * Can you share the exact steps that you’ve used to set up your VPS? I will attempt
   the same and see if I can get the same issue to happen.
 * –Albert
 *  Thread Starter [prototype2](https://wordpress.org/support/users/prototype2/)
 * (@prototype2)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/work-with-caddy-web-server/#post-14096287)
 * Manage to trace down to this `cgi.fix_pathinfo = 0` which I have added in php.
   ini, commented out is working now.
 * Are there any way to get around when some users will add this cgi.fix_pathinfo
   when using Caddy?
 *  Plugin Author [Albert Peschar](https://wordpress.org/support/users/kiboit/)
 * (@kiboit)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/work-with-caddy-web-server/#post-14105898)
 * Hi [@prototype2](https://wordpress.org/support/users/prototype2/),
 * I’m glad you’ve resolved the problem.
 * When I test with Caddy and `cgi.fix_pathinfo = 0`, I get an error from PHP `Access
   denied.` when accessing any PHP file with additional parameters after the file
   name:
 * `/test.php/abc`
 * In any case, I’ve made a small change to the way the parameters are extracted
   from the URL when the server is not configured to pass `PATH_INFO` to the PHP
   script. This might resolve this kind of problem in similar situations.
 * –Albert

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/work-with-caddy-web-server/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/work-with-caddy-web-server/page/2/?output_format=md)

The topic ‘Work with Caddy web server?’ is closed to new replies.

 * ![](https://ps.w.org/phastpress/assets/icon-256x256.png?rev=1873505)
 * [PhastPress](https://wordpress.org/plugins/phastpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/phastpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/phastpress/)
 * [Active Topics](https://wordpress.org/support/plugin/phastpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/phastpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/phastpress/reviews/)

 * 17 replies
 * 2 participants
 * Last reply from: [Albert Peschar](https://wordpress.org/support/users/kiboit/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/work-with-caddy-web-server/page/2/#post-14149847)
 * Status: not resolved