Jump to content

Search the Community

Showing results for tags 'nginx'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 18 results

  1. I am writing here instead of the ProCache forum because I have the impression that several nginx experts could solve this. In its new version, Procache proposes new .htaccess rules that are difficult to translate into nginx rules. We currently have a problem with the trailing slash of URLs which gives us a bad score in SEO analysis tools such as semrush.com. Indeed, a canonical URL is either without or with "/", but cannot be served by both options. Although ProcessWire without ProCache respects this rule, ProCache has no difficulty serving both, which is considered an SEO optimisation fault. I believe that ProCache version 2 solves this problem with these new rules, but I can't understand the following. Does anyone have any idea how to translate this into a nginx rule? Attached also the whole proposed .htaccess for ProcessWire. # PROCACHE v2/31885be14d6cfb4b2b0d3e533260bded -------------------------------------------------- RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{QUERY_STRING} !.*=.* RewriteRule ^.*/$ - [E=pwpcstep:pour,E=pwpcname:index] RewriteCond %{ENV:pwpcstep} "=pour" RewriteCond %{HTTP_COOKIE} !^.*(wire_challenge|wires_challenge).*$ RewriteRule ^.*/$ - [E=pwpcstep:stir,E=pwpcpath:%{DOCUMENT_ROOT}/site/assets/ProCache-00478359c5e65dbada1075bfbd4] RewriteCond %{ENV:pwpcstep} "=stir" RewriteCond %{ENV:pwpcpath}/$0/%{ENV:pwpcname}.html -f RewriteRule ^.*$ - [E=pwpcstep:drink,E=pwpcfile:$0/%{ENV:pwpcname}.html] RewriteCond %{ENV:pwpcstep} "=drink" RewriteRule ^(.*) %{ENV:pwpcpath}/%{ENV:pwpcfile} [L] <ifModule mod_headers.c> Header set X-PWPC "ProCache" env=pwpcstep Header set X-Powered-By "ProcessWire CMS, ProCache" env=pwpcstep </ifModule> RewriteCond %{REQUEST_URI} "^/~?[-_.a-zA-Z0-9/]*$" # /PROCACHE ------------------------------------------------------------------------------------- .htaccess-procache
  2. I have a new server and wanted to use nginx. However, I have two ProcessWire websites which does not let me do anything. I'll get this error every time when I try to change something and sometimes when logging in. Deleted all caches already from ProcessWire and browser. This also happens after installing new ProcessWire and all directories were owned by www-data. I also have two working websites without any problems and all these four uses same kind of setting on nginx config. I don't understand why some of those working fine and some not. Running Debian 10, MariaDB 10.3.22, PHP 7.4, nginx 1.14.2 This request was aborted because it appears to be forged. #0 /sites/clients/clientname/wire/modules/Process/ProcessPageTrash.module(49): ProcessWire\SessionCSRF->validate() #1 /sites/clients/clientname/wire/core/Wire.php(380): ProcessWire\ProcessPageTrash->___execute() #2 /sites/clients/clientname/wire/core/WireHooks.php(823): ProcessWire\Wire->_callMethod() #3 /sites/clients/clientname/wire/core/Wire.php(450): ProcessWire\WireHooks->runHooks() #4 /sites/clients/clientname/wire/core/ProcessController.php(337): ProcessWire\Wire->__call() #5 /sites/clients/clientname/wire/core/Wire.php(380): ProcessWire\ProcessController->___execute() #6 /sites/clients/clientname/wire/core/WireHooks.php(823): ProcessWire\Wire->_callMethod() #7 /sites/clients/clientname/wire/core/Wire.php(450): ProcessWire\WireHooks->runHooks() #8 /sites/clients/clientname/wire/core/admin.php(150): ProcessWire\Wire->__call() #9 /sites/clients/clientname/wire/modules/AdminTheme/AdminThemeDefault/controller.php(13): require('/sites/clients/...') #10 /sites/clients/clientname/site/templates/admin.php(15): require('/sites/clients/...') #11 /sites/clients/clientname/wire/core/TemplateFile.php(318): require('/sites/clients/...') #12 /sites/clients/clientname/wire/core/Wire.php(380): ProcessWire\TemplateFile->___render() #13 /sites/clients/clientname/wire/core/WireHooks.php(823): ProcessWire\Wire->_callMethod() #14 /sites/clients/clientname/wire/core/Wire.php(450): ProcessWire\WireHooks->runHooks() #15 /sites/clients/clientname/wire/modules/PageRender.module(536): ProcessWire\Wire->__call() #16 /sites/clients/clientname/wire/core/Wire.php(383): ProcessWire\PageRender->___renderPage() #17 /sites/clients/clientname/wire/core/WireHooks.php(823): ProcessWire\Wire->_callMethod() #18 /sites/clients/clientname/wire/core/Wire.php(450): ProcessWire\WireHooks->runHooks() #19 /sites/clients/clientname/wire/core/WireHooks.php(924): ProcessWire\Wire->__call() #20 /sites/clients/clientname/wire/core/Wire.php(450): ProcessWire\WireHooks->runHooks() #21 /sites/clients/clientname/wire/modules/Process/ProcessPageView.module(213): ProcessWire\Wire->__call() #22 /sites/clients/clientname/wire/core/Wire.php(383): ProcessWire\ProcessPageView->___execute() #23 /sites/clients/clientname/wire/core/WireHooks.php(823): ProcessWire\Wire->_callMethod() #24 /sites/clients/clientname/wire/core/Wire.php(450): ProcessWire\WireHooks->runHooks() #25 /sites/clients/clientname/index.php(55): ProcessWire\Wire->__call() #26 {main}
  3. Hello Everyone, Sorry that I have not been on the forums much of late. As my development team moves to use ProcessWire as our main cms tool for clients. We have needed to make sure that ProcessWire works on nginx platform. We use both apache and nginx, we found as many already have that nginx is faster and easier to configure. It scales well and when you really need speed it is a great solution. Anyways with all that being said ProcessWire was surprisingly easy to configure for nginx and did not require adding or modifying any code. Using the same "try_files" directives used for Wordpress and Dupral I was able to run it under nginx, here is a sample config: upstream php { server unix:/tmp/php-cgi.socket; server; } server { listen 80; server_name hostname; root /websites/path/to/processwire; index index.php; try_files $uri $uri/ /index.php?it=$uri&$args; location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; include fastcgi.conf; fastcgi_intercept_errors on; fastcgi_pass php; } } There are a few things that still need to be done like protecting the wire and certain directories like assets but so far everything looks to be working correctly. If ProcessWire has a test suite, I could run it against this server to see if everything is functioning properly. I think that advertising the fact that ProcessWire works under nginx would greatly help to attract more eyes to the project(not that it isn't doing great already) and to give options to hosting and scalability. If you would like help working on this for official support of the platform, perhaps with adding detection algorithms to the install or anything else that is needed, I would be glad to help. Anyways I hope someone finds this post useful.
  4. Hell, Although I use a config on an other of my sites that works well. An error 500 is driving me nuts. Coul someone have a look on my config server { listen 80; server_name attente.xyz; rewrite ^ https://$server_name$request_uri? permanent; } server { listen 443 ssl; server_name attente.xyz; ssl_certificate /etc/letsencrypt/live/krouus.company/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/krouus.company/privkey.pem; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Activer le ciphers et mettre ceux autorisés (je vous laisse faire de plus amples recherches pour ça ;) ) ssl_prefer_server_ciphers on; ssl_ciphers 'DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-CAMELLIA256-SHA:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-CAMELLIA128-SHA:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES128-SHA256'; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; # La fameuse clé générée en dernier ssl_dhparam /etc/nginx/dhparam.pem; # Ajout d'une règle http add_header Strict-Transport-Security "max-age=31536000;"; root /var/www/attente.xyz/html; index index.php index.html index.htm; location / { # try_files $uri $uri/ /index.php?it=$uri&$args; try_files $uri /index.php$is_args$args; fastcgi_pass unix:/run/php/php7.0-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; fastcgi_ignore_client_abort off; fastcgi_connect_timeout 60; fastcgi_send_timeout 180; fastcgi_read_timeout 180; fastcgi_buffers 4 256k; fastcgi_buffer_size 128k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; } location ~ \.php$ { #try_files $uri =404; include snippets/fastcgi-php.conf; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/run/php/php7.0-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # .htaccess 10. fastcgi_param HTTP_MOD_REWRITE On; fastcgi_param X-Real-IP $remote_addr; fastcgi_param X-Forwarded-For $remote_addr; fastcgi_param Host $host; } location ~* \.(?:css|gif|htc|ico|js|jpe?g|png|swf|svg|ttf|eot|woff|less|pdf)$ { #expires max; log_not_found off; ## No need to bleed constant updates. Send the all shebang in one ## fell swoop. tcp_nodelay off; ## Set the OS file cache. open_file_cache max=1000 inactive=120s; open_file_cache_valid 45s; open_file_cache_min_uses 2; open_file_cache_errors off; valid_referers attente.xyz; ##ajout ProcessWire expires 24h; #log_not_found off; access_log off; try_files $uri /index.php?it=$uri&$args; } # .htaccess 8.1 charset utf-8; # .htaccess 3. location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { log_not_found off; access_log off; } # .htaccess 4. # add_header X-Frame-Options SAMEORIGIN always; # Set by ProcessWire core add_header X-XSS-Protection "1; mode=block"; # add_header X-Content-Type-Options "nosniff"; # ----------------------------------------------------------------------------------------------- # .htaccess 5. # ----------------------------------------------------------------------------------------------- # Block access to ProcessWire system files location ~ \.(inc|info|info\.json|module|sh|sql)$ { deny all; } # Block access to composer files location ~ composer\.(json|lock)$ { deny all; } # Block access to any file or directory that begins with a period (except well-known) location ~ (^|/)\.(?!well-known)|^\..*$ { deny all; } # ----------------------------------------------------------------------------------------------- # .htaccess 15. # ----------------------------------------------------------------------------------------------- # Block access to protected assets directories location ~ ^/(site|site-[^/]+)/assets/(cache|logs|backups|sessions|config|install|tmp)($|/.*$) { deny all; } # Block acceess to the /site/install/ directory location ~ ^/(site|site-[^/]+)/install($|/.*$) { deny all; } # Block dirs in /site/assets/ dirs that start with a hyphen location ~ ^/(site|site-[^/]+)/assets.*/-.+/.* { deny all; } # Block access to /wire/config.php, /site/config.php, /site/config-dev.php, and /wire/index.config.php location ~ ^/(wire|site|site-[^/]+)/(config|index\.config|config-dev)\.php$ { deny all; } # Block access to any PHP-based files in /templates-admin/ location ~ ^/(wire|site|site-[^/]+)/templates-admin($|/|/.*\.(php|html?|tpl|inc))$ { deny all; } # Block access to any PHP or markup files in /site/templates/ location ~ ^/(site|site-[^/]+)/templates($|/|/.*\.(php|html?|tpl|inc))$ { deny all; } # Block access to any PHP files in /site/assets/ location ~ ^/(site|site-[^/]+)/assets($|/|/.*\.php)$ { deny all; } # Block access to any PHP files in core or core module directories location ~ ^/wire/(core|modules)/.*\.(php|inc|tpl|module)$ { deny all; } # Block access to any PHP files in /site/modules/ location ~ ^/(site|site-[^/]+)/modules/.*\.(php|inc|tpl|module)$ { deny all; } # Block access to any software identifying txt files location ~ ^/(COPYRIGHT|INSTALL|README|htaccess)\.(txt|md)$ { deny all; } # Block all http access to the default/uninstalled site-default directory location ~ ^/site-default/ { deny all; } } Thank you for any hunch.
  5. Hi i'm having a recurrent problem I found on this forum: when using the image uploader I get the following error on console "Unexpected token < in JSON". But I couldn't solve it with any of the other proposed solutions: setting debug to true setting $config->uploadTmpDir = dirname(__FILE__) . '/assets/uploads/'; setting uploadTmpDir in php.ini BUT This problem only appears for non superuser users (ie editors). Running on a Digitial Ocean Server with NGINX and PHP 7.1. Version is ProcessWire 3.0.62 Note: Im using Fredi plugin, but i doubt that's the problem because I'm using it in other sites with no problem Any idea how i could solve this (even with non ajax image upload) I need to sort this as fast and simple as possible Thanks in advance
  6. Now I add a PW on my domain. It runs OK. Then I have a second demo PW running under /demo/ subdirectory. and adding these code to nginx rewrite: location /demo/ { try_files $uri $uri/ /demo/index.php?it=$uri&$args; } Then I access the subdirectory's homepage(/demo/) is OK, other page return a 404 error. But I replaced the other cms to /demo/, It's really OK. Why? How to fix these errors?
  7. Hello everyone, I've been fiddling around a lot lately with docker containers for my local development on a linux machine. Tried many different options, also readily available processwire images and tutorials from the forum. But never got it right. Mainly because of permission issues with docker volumes. That is a tricky part on linux machines whereas on OSX it doesn't seem to be an issue. Then I discovered http://www.wordpressdocker.com/. And the setup with nginx as a proxy that routes requests to separate containers with the actual site install appealed to me. The whole thing sits on top of alpine linux containers which are really lightweight. So I decided to give it a try. And, first time since experimenting with docker, I got a running PW install. Rewriting was not working until I adjusted the nginx config. Now I have a fairly complex PW site running in a container. Everything is working, image upload/editing etc. So I'm really exited, especially since the dev site is now blazing fast compared to my old vagrant virtualbox vm setup. Honestly, I don't really understand everything that is happening behind the scene. But I managed to adjust the original files and build a new image that works with PW and doesn't have all the WP stuff. The nginx config I took from https://github.com/elasticweb/nginx-configs/blob/master/configs/processwire-2.conf Not sure if it covers everything for PW3 as well. I would very much appreciate if someone who is more in the know than me could take a look. All files for building the docker image are here https://github.com/gebeer/alpine-php-processwire A working image here: https://hub.docker.com/r/gebeer/alpine-php-processwire/ Documentation is kind of lacking. I took over quite a lot from the original project. But following the github README and the original documentation should get people started who have a little experience with docker already. If someone needs a more in depth step by step tutorial for setting things up, let me know and I'll put something together.
  8. Hello! Looking for a bit of advice or suggestions here. I don't claim to be a nginx expert, but I have PW version 3.0.62 powering an app running on a cloud server with nginx. Everything operates fine for the most part, but from time to time I am getting a network error message when trying to navigate in the admin or just a plain ole 500 error. Specifically when logging in initially and trying to view the page tree. A pop up window appears with the network error message (I will grab a screen shot next time I see it). Also when navigating through the admin I get random 500 errors. php 5.6.x nginx cloud hosting service A couple of corresponding logs below. Error log in pw admin: Error: Cannot instantiate abstract class ProcessWire\ProcessPageListRender (line 331 of /xxx/xxx/xxx/wire/modules/Process/ProcessPageList/ProcessPageList.module) Nginx Error log: 017/05/12 10:11:47 [error] 7305#0: *14305329 readv() failed (104: Connection reset by peer) while reading upstream, client: xx.xxx.xxx.xxx, server: theserver, request: "GET /login/page/ HTTP/1.1", upstream: "fastcgi://unix:/xxxxx/dev/.php-fpm.socket:", host: "thehost", referrer: "http://domain/login/setup/logs/view/errors/" 017/06/21 14:15:29 [error] 29093#0: *106631997 readv() failed (104: Connection reset by peer) while reading upstream, client: xx.xxx.xxx.xxx, server: server, request: "GET /login/page/edit/?id=1489 HTTP/1.1", upstream: "fastcgi://unix:/xxxxx/dev/.php-fpm.socket:", host: "thehost", referrer: "http://domain/login/page/" Thanks for your time.
  9. Hi, I'm having some issues with PW after a NGINX error, I'll try to elaborate: 1) My nginx site conf file went corrupt. 2) try to recreate it using: https://processwire.com/talk/topic/275-processwire-on-nginx/ 3) All my urls are accesible using '/' or without it. 4) I have urls that doesn't work without the / at the end, the url is dynamic (I check for the segments) Ex: "www.url.com/something/countries/usa" works! "www.url.com/something/countries/usa/" works! "www.url.com/something/countries/mexico/" works! "www.url.com/something/countries/mexico" doesn't work I assume it has something to do with my nginx, it only happens with the same country, in fact if you use a country that doesn't exist it just redirect you to the main url, but in 'mexico' case it just return a 404. Any ideas??? edit: something I forgot I testing adding it a backslash to all urls but the backend has some troubles when it comes to saving.
  10. Hi all. I have a successfully installed and running PW site on NGINX. It all went well and easy thanks to the hints and tricks in some thread. However even though I hits the frontpage nicely then any navigation to anything on the site returns a 404 - even the admin panel URL. I suspects that it does not properly pass the URL to processwire but is instead trying to move to a directory. Any ideas? edit: it works without subdirectories, this my config with subdirectory tryna to solve it. not work though root /var/www/test.test/html; index index.html index.php; server_name test.test access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; error_page 401 403 404 /404.html; # ----------------------------------------------------------------------------------------------- # This location processes all other requests. If the request is for a file or directory that # physically exists on the server, then load the file. Else give control to ProcessWire. # ----------------------------------------------------------------------------------------------- location / { try_files $uri $uri/ /index.php?it=$uri&$args; } location /pw { try_files $uri $uri/ /pw/index.php?it=$uri&$args; }
  11. try to get PW 3.0.30 up on Ubuntu 16.04 / nginx version: nginx/1.10.0 (Ubuntu) the installation works fine but afterwards only default page displays, any other throws a 404 error page. we looked at the PW on Ngnix on Howtoforge any idea, thanks nginx access.log shows: server { listen 80; server_name processwire; index index.php index.html; root /var/www/html/promowall.ch/public_html/ProcessWire-devns; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; default_type application/x-php; ### SECURITY - Protect crucial files location ~ /\. { deny all; } location ~ /(COPYRIGHT|LICENSE|README|htaccess)\.txt { deny all; } location ~ ^/site(-[^/]+)?/assets/(.*\.php|backups|cache|config|install|logs|sessions) { deny all; } location ~ ^/site(-[^/]+)?/install { deny all; } location ~ ^/(site(-[^/]+)?|wire)/(config(-dev)?|index\.config)\.php { deny all; } location ~ ^/((site(-[^/]+)?|wire)/modules|wire/core)/.*\.(inc|module|php|tpl) { deny all; } location ~ ^/(site(-[^/]+)?|wire)/templates(-admin)?/.*\.(inc|html?|php|tpl) { deny all; } ### GLOBAL REWRITE location /ProcessWire-devns { try_files $uri $uri/ /index.php?it=$uri&$args; } # pass the PHP scripts to FastCGI server on local socket # location ~ .+\.php((/|\?).*)?$ { fastcgi_pass unix:/run/php/php7.0-fpm.sock; fastcgi_index index.php; fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param HTTP_MOD_REWRITE On; include fastcgi_params; } # redirect server error pages to the static page /40x.html error_page 404 /404.html; location = /40x.html { root /usr/share/nginx/html; } # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } }
  12. HELLO! Is anyone running a http/2 setup in production yet and have any strategies / experiences they can share? I'm currently running on Ubuntu with DigitalOcean | nginx with serverpilot.io (and they now offer https/2 support)
  13. Hi, I don't know if this is the right section for this but I collected some thoughts and a kind of manual about how to increase the performance of your website under load with nginx and fastcgi_cache. At best, this could be a kind of ProCache for nginx users, as not everyone is using Apache and thus not able to use ProCache on their sites. Additionally, this solution comes with the benefit of server side mobile detection and selective caching. http://svn.matthiashaak.com/website-performance-with-processwire-nginx-and-fastcgi_cache/ Please let me know your thoughts or questions about this. Be aware however, that with this solution you end up serving static pages, so no hooks or PHP functions will be called. I am currently working on a module that eases the cache purging, so kindly be patient if you need this. "Wait, and thou shalt receive"
  14. Hello, I'm deployed multiple pw sites already, all with nginx. This time I need to have multiple pw sites for a domain, every one of them under a subdirectory. I've been trying many things, every time I get 404 or 500 errors on /directory/processwire ( the /directory/ works, other pages not ). Did someone already managed to get that working ? PS : Apache is not an option
  15. Story: https://processwire.com/talk/topic/9250-what-should-i-do-to-make-pw-to-work-with-a-reverse-proxy-cache/ After a few days of reading documentation, I got processwire to work with nginx reverse proxy cache. This is not a tutorial on how to install server software. A working nginx config copy will be posted on next reply. Ubuntu 14.04.1 x64 Nginx 1.4.6 apache 2.4.7 mysql 5.6.19 php 5.6.6 (php5-fpm) A new copy of content will be fetched instantly. A screencast of this demo
  16. Just spotted a PW on Nginx installation tutorial on how-to-forge. I quite like that site - find it useful from time-to-time - so big thanks to Falko Timme for taking time to write it up. Nice
  17. Hi, I know there have been a lot of talks on providing official support for nginx (Link - http://processwire.com/talk/topic/275-processwire-on-nginx/) however, official support for it is not mentioned in the current roadmap (Link - http://processwire.com/about/roadmap/) I was wondering if this is likely to happen anytime soon. Any thoughts?
  18. Is anyone tried using nginx as frontend proxy to serve static content and apache as backend. I am having trouble in image upload path as now upload folders are created with hyphens in start so getting not found error. Any sample conf file for frontend proxy I have seen conf file when nginx used alone but that not helping
  • Create New...