Jump to content

u-nikos

Members
  • Content Count

    38
  • Joined

  • Last visited

Community Reputation

76 Excellent

About u-nikos

  • Rank
    Distinguished Member

Profile Information

  • Gender
    Male
  • Location
    The Netherlands

Recent Profile Visitors

3,390 profile views
  1. Thanks for the quick response and suggestion Ryan. This particular project requires separate tree's, but I'm sure the LanguageSupportPageNames module will come in handy some day! Guess I'll need to modify the Multisite module then?
  2. Hey all, I'm developing a multilingual website with the following tree structure: - root - en - about-us - nl - over-ons But, because "nl" is the main language, I want to set the "nl" page as the website root (essentially stripping out the "/nl/" part within URLs). For example: http://www.website.nl/over-ons/ = page found http://www.website.nl/nl/over-ons/ = page not found http://www.website.nl/en/about-us/ = page found http://www.website.nl/about-us/ = page not found Is this possible with ProcessWire or do I need to modify Apeisa's Multisite module to enable this functionality? Greetings, Niek
  3. Ok, I've bought the ProCache module (developer version) and it's working great with Nginx! I'm willing to share my Nginx configuration directives for other people if that's okay with you Ryan?
  4. Hey Ryan, Any news regarding Nginx support? I would love to help out if possible Greetings, Niek
  5. Hey all, I've converted the ProcessWire 2.3 rules to Nginx. Hope this will help some people Greetings, Niek server { listen 80; listen 443 ssl; root /var/www/example.com/public_html; server_name example.com www.example.com; ssl_certificate /etc/pki/tls/certs/example.com.crt; ssl_certificate_key /etc/pki/tls/private/example.com.key; client_max_body_size 50m; access_log /var/www/example.com/_logs/access.log; error_log /var/www/example.com/_logs/error.log; # ----------------------------------------------------------------------------------------------- # Set default directory index files # ----------------------------------------------------------------------------------------------- index index.php index.html index.htm; # ----------------------------------------------------------------------------------------------- # Optional: Redirect users to the 'www.' version of the site (uncomment to enable). # For example: http://processwire.com/ would be redirected to http://www.processwire.com/ # ----------------------------------------------------------------------------------------------- if ($host !~* ^www\.) { rewrite ^(.*)$ $scheme://www.$host$1 permanent; } # ----------------------------------------------------------------------------------------------- # Access Restrictions: Protect ProcessWire system files # ----------------------------------------------------------------------------------------------- # Block access to ProcessWire system files location ~ \.(inc|info|module|sh|sql)$ { deny all; } # Block access to any file or directory that begins with a period location ~ /\. { deny all; } # 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; } # ----------------------------------------------------------------------------------------------- # If the request is for a static file, then set expires header and disable logging. # Give control to ProcessWire if the requested file or directory is non-existing. # ----------------------------------------------------------------------------------------------- location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|eot|woff|ttf)$ { expires 24h; log_not_found off; access_log off; try_files $uri $uri/ /index.php?it=$uri&$args; } # ----------------------------------------------------------------------------------------------- # 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; } # ----------------------------------------------------------------------------------------------- # Pass .php requests to fastcgi socket # ----------------------------------------------------------------------------------------------- location ~ \.php$ { # Check if the requested PHP file actually exists for security try_files $uri =404; # Fix for server variables that behave differently under nginx/php-fpm than typically expected fastcgi_split_path_info ^(.+\.php)(/.+)$; # Set environment variables include fastcgi_params; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # Pass request to php-fpm fastcgi socket fastcgi_pass unix:/var/run/example.com_fpm.sock; } }
  6. Thanks Ryan, that sounds like a good solution!
  7. Hey all, Our website is targeted by a spambot, and now we're getting hundreds of CSRF Exception e-mails. I do like the Exception logging and the CSRF protection, so would it be possible to only disable the CSRF notifications? Greetings, Niek
  8. Hey Doolak! Yes this is intended behaviour. I'll explain what the module does: 1. When a page is saved with the news_article template, the module will find the first parent page that isn't a year/month/day template (in this case: News). 2. Then it'll create the year/month/day templates under that parent page, and move the news_article into it (in this case: it'll create the 2013 year archive under News, and move the Lorem Ipsum news_article into it). 3. After the news_article is moved, the module will cleanup empty year/month/day archives (in this case: it'll delete the Recent News and Archive pages because you've told the module that they are year archives, and they are cleaned up because they're empty). If you want to retain the Recent News and Archive pages, you should create an different template for the year archives, like "news_year_archive" and tell the module to use this template for the year archives. Little example: - News (template=news) - 2013 (template=news_year_archive) - Lorem Ipsum (template=news_article) - Dolor Sit (template=news_article) - Recent News (template=news_overview) - Archive (template=news_overview) Although I'm not sure if you really need the Recent News and Archive pages (because News could already show the recent news, and the 2013 page is already an archive), but I hope this helps u
  9. Hey Marty, No need to do that manually, you can put a little snippet in one of your templates to save the pages automatically (be sure to remove the snippet when you're done). Here is a little example: <?php foreach ($pages->find('template=news-item') as $item) { $item->save(); } ?>
  10. Maybe it would be possible to create a repository with ProcessWire profiles (with screenshots, color filtering etc.) for the non-technical people? This could be another selling point. Although I do think the profile installation process should be streamlined with a nice UI or something to make it successful.
  11. Well, all cache related settings are done through the admin UI at the moment, but maybe Ryan has a better opinion on this. I'm fine with both options. I've also updated the MarkupCache module to support the CacheName "PageSelector" format. MarkupCache.module
  12. Yeah I didn't really think about version compatibility, will try to do so in the future I've changed the $session->redirect argument from $page->path to $page->url, so it should be fixed now.
  13. Thanks for the report geniestreiche, I've removed the function array dereferencing from the module as it is only available in PHP 5.4+. Could u test if everything work now?
  14. Maybe u could say it like: Clear this cache "if a page is saved that matches this selector" But the main reason is that I think it would be easier to find a specific rule if all cache names are aligned at the left side
  15. I'm fine with those limitations/requirements and would be more than happy if u could integrate this functionality into the MarkupCache module Edit: Maybe it's an idea to switch the name and the selector? Think it would be easier to identify a rule if the name comes first. Especially if you have a bunch of them. Something like: TopNavigation "template=basic-page" HomeNewsSlider "template=news-item" Or: TopNavigation => template=basic-page HomeNewsSlider => template=news-item Some extra rows for the textarea field would also be nice. 5 rows seems to be a bit tiny.
×
×
  • Create New...