Questions tagged [nginx]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
16 views

Nginx config - cachebusting rewrite for multiple server blocks/domains?

So I have a Craft CMS multi-site setup on a Forge-managed VPS... (and oh boy I wish there was more documentation on setting this up, huge thanks to Philip for helping me get to this point) The ...
1
vote
0answers
23 views

Account Verification or Password Reset Error

Craft 2.6 I have a site that's been running for some time and now when trying to do a password reset or account verification error I get the following message. I found this stack exchange thread ...
1
vote
2answers
159 views

CraftCMS config on WTServer / WinNMP for Windows with Nginx

Has anyone had success with using Craft and WTServer (WinNMP) together? I'm getting a 400 error at "http://craft.test/index.php?p=admintrigger/actions/users/login" after trying to login the admin. I'm ...
1
vote
0answers
52 views

Multi site live preview not working on index page

I'm on Craft 3.1.17.2 My multisite setup is using different domains. If I'm on a.com, I can Live Preview everything on b.com fine, except the homepage. I get the error Access to XMLHttpRequest at '...
1
vote
1answer
32 views

shell script question on homestead

I added a nginx config rewrite rule to remove static asset numbers from file names. It works great on the server config file. # enable static file caching location ~* (.+)\.(?:\d+)\.(js|css|...
1
vote
1answer
145 views

/admin displays homepage content, and I can't login

Right so my nginx config is a trimmed down version of Andrew Welch's config as detailed here. All good. Caching works a dream on all the public pages. However now when I go to /admin, it loads the ...
1
vote
0answers
76 views

Rewrite locale urls on nginx, but not for registration links

I'm using this Gist to rewrite the urls on a localized website running on nginx. It's working fine, except for the account activation links. They are localized as well, but they shouldn't. I'm sure ...
1
vote
2answers
230 views

nginx conf for craft

I have php70 with nginx on vestacp. My admin panel work when url example.com/index.php?p=admin/dashboard, but not work example.com/admin/dashboard My nginx conf: server { listen ip:80; ...
1
vote
1answer
330 views

When saving an Entry, I receive a JSON response rather than returning to the Entry's edit page

Craft Version: 3.0.4 Web Server: Apache + Nginx proxy Recently I've been working on a couple of Craft 3 projects for deployment on my institution's web servers. In the past, I've successfully ...
1
vote
2answers
3k views

Trailing slashes with Nginx and Craft

What's the best way to redirect to a trailing slash in Nginx with Craft CMS? I've seen some advice for Apache .htaccess, etc, but not Nginx. For those curious, here's why I might want to do this: To ...
1
vote
1answer
88 views

Making a base url without /public

I'm creating a site that works now at www.mysite.com/public/ I would love to get to drop the /public off the url so it is: www.mysite.com Does anyone know how to do this? Thank you!
1
vote
1answer
169 views

Retour Redirects with Craft and nginx

I have come across an issue whilst using the Retour plugin for Craft similar to the question raised here but this is a redirect with a URL using the .htm extension and not .php. Any ideas why this ...
1
vote
2answers
897 views

Exclude path in NGINX config (for FastCGI Caching)

I've got a Craft 2 site on an NGINX server that uses FastCGI Caching (based on Static Page Caching with Craft CMS), but I've got a few pages that have some dynamic content that I'd like to exclude ...
0
votes
1answer
407 views

what is a base, no frills, nginx conf file to get up and running with Craft CMS and MAMP Pro

So far I've only ever developed for Apache servers but that streak is about to end and I'm having to dive into nginx. However, none of the so-called base nginx conf files seem to work for me and there'...
2
votes
2answers
300 views

Redirects with Craft and nginx

I'm running into a few issues trying to set up 301/302 redirects with Craft and nginx. The legacy site has /contact.php paths which I would like to direct to /info/ but when I visit mysite.com/contact....
0
votes
1answer
380 views

Update Asset Indexes for new files in s3 not working

We uploaded a lot of images to the S3 bucket that is connected to our assets in Craft, but when we run "Update Asset Indexes" on the settings page, those images aren't added to the assets in Craft. I'...
1
vote
1answer
173 views

Craft Folder Error

I switched from Apache to Nginx. When I did that the Craft folder that was outside of the web root no longer was recognized. Checked around, dug into my .conf files and spent a boatload on this ...
1
vote
1answer
753 views

Craft 3 beta nginx config

I have a Craft 3 beta project working fine on my local laravel/homestead box using nginx, however when I push to Heroku using their heroku-php-nginx build pack I get nginx (not Craft) 404s when trying ...
2
votes
1answer
434 views

Load Balancing Craft CMS - Admin gets logged out instantly

We are load balancing 2 servers hosting an identical Craft environment. When clicking around in the admin a user will get logged out after 30 seconds and sometimes even faster when browsing in the ...
3
votes
2answers
613 views

Static page caching using Nginx FastCGI Cache with CraftCMS

This isn't Craft issue per se. But I was wondering if anyone can help me out. I’m trying to enable FastCGI Cache in my server. My nginx server block is coming from this helpful article: https://...
1
vote
0answers
484 views

Craft Nginx Cache Static Resources - Css, JS Errors

I'm currently trying to cache css and js files with the widely known config as follows: location ~* \.(png|jpg|css|js|jpeg|gif|ico|xls|doc|zip|exe|mp3|mp4|pdf|ai|psd|eps|ppt|dmg|csv|key|numbers|cur|...
0
votes
2answers
412 views

Can I use an IP address instead of a FQDN?

Thank you to anyone that can provide real assistance to my problem with Craft and installing it on a local server. Your help and assistance are truly appreciated!! :-) I need 100% confirmation that ...
1
vote
1answer
763 views

Upload images bigger than 1MB not working

I am trying to upload jpg assets to Craft. As long as the files are smaller than approx. 1MB it's working, even in bulk upload. As soon as there's a file bigger than 1MB Craft gets stuck like this: ...
1
vote
1answer
4k views

After upgrading to PHP 7 I started getting “storage folder isn't writable by PHP” errors

I just recently upgraded to PHP 7. The browser is now showing following error /home/xxx/craft/storage isn't writable by PHP. Please fix that Have not changed any permissions on any of the folders. ...
2
votes
2answers
907 views

500 Internal Server Error in OpenShift install

I'm running into a 500 Internal Server Error when trying to install craft (on openshift). Environment: Platform: OpenShift (nginx-php7 cartridge: https://github.com/pinodex/openshift-cartridge-nginx-...
1
vote
1answer
4k views

Getting PHP errors to log in Nginx/PHP-FPM

Under Nginx/PHP-FPM, I can't get PHP errors logged to craft/storage/runtime/logs/phperrors.log as they should be. Initially, errors weren't logging anywhere, but I discovered I needed: ...
3
votes
2answers
233 views

Non-default web port

I'm running Nginx on port 8888 locally. fastcgi_params is sending SERVER_PORT to PHP-FPM, which I am able to verify with phpinfo() output and craft/storage/runtime/logs/craft.log. I'm also able to ...
2
votes
1answer
165 views

Barebones LEMP + Craft CMS walkthrough

No fancy deployment, version control etc etc. Just a cut and dry walkthrough on how to get Craft CMS up and running on a LEMP stack, does it exist? I'm fairly new to craft but have had no problem with ...
0
votes
1answer
848 views

multi environment nginx, how to check $_SERVER['SERVER_NAME']

I'm trying to have Craft switch baseUrl in general.php based on the environment. The Craft docs tells me to specify the environment in index.php by using logic based on the $_SERVER['SERVER_NAME'] ...
2
votes
1answer
1k views

Nginx: index.php URLs still being served alongside pretty URLs

For whatever reason https://domain.com/index.php?p=path/to/whatever and https://domain.com/index.php/to/whatever both still work and are not being redirected or rewritten to https://domain.com/path/to/...
2
votes
3answers
640 views

Unable to manage robots.txt in Craft

I would like my robots.txt file to be generated by Craft. Things that I have tried that don't work: a craft/templates/robots.txt template a craft/templates/robots.txt.twig template a route for robots....
0
votes
1answer
1k views

400 Bad Request on account or admin login

On attempting to login into either a front-end account or admin account I'm hit by: 400 Bad Request Request Header Or Cookie Too Large nginx/1.8.0 It's only happened recently but running the latest ...
3
votes
2answers
2k views

Asset URLs not HTTPS

I'm currently redirecting all requests to https. I've updated the siteUrl variable and all of my entry links have been correctly updated but the image links are still http. When I go to the admin ...
2
votes
1answer
1k views

Nginx FastCGI caching NO PROXY

We are implementing fast CGI cache (not not the proxy version) but it seems that our upstream cache hit is always MISS. If we hijack public/index.php by not running require_once($craftPath."/vendor/...
2
votes
0answers
352 views

localization is NOT working

i'm running centos 6.6, nginx 1.7.7, mysql and php-fpm (i believe 5.5.3) and craft 2.4.2669. i enable a new language and let all the background tasks complete (the default data copied to the ...
5
votes
2answers
1k views

Apache or Nginx for a Craft site

Any recommendations as to whether it is better to use Apache or Nginx for a Craft website? If the answer is "it depends", could you please delineate some of the advantages and disadvantages of each ...
2
votes
2answers
1k views

Why might the admin panel's font 404?

The admin panel's icon font refuses to load, throwing a 404 along with the full body of the font file. The result looks like this: I don't know nginx well, but we recently added a change to the ...
0
votes
1answer
1k views

How to fix admin assets url-s on nginx?

After moving a Craft website from Apache server to Nginx, the admin css\js assets url-s stopped resolving. For example, on /admin/login page Craft CMS tries connecting to the /admin/resources/lib/...
1
vote
1answer
555 views

Serving Craft from a sub-directory on Nginx

I'm starting with a clean install, empty database. What would be the changes needed to this Nginx configuration to serve craft from /articles/ instead of "/"? Any specific configurations that ...
5
votes
1answer
15k views

Adding cache headers to Nginx configuation file breaks the /admin area

When I add this to my Nginx Confirguration file: location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires 7d; add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, ...
1
vote
1answer
525 views

Admin assets not being served over https

I switched my craft install to be completely served over SSL. The front end continued working fine, but the backend is 404'ing all static assets. I assume this is because the http was handling the /...
2
votes
2answers
1k views

/admin/install/ missing resource files (css/js 404) and is unstyled

Has anyone else run into an unstyled /admin/install/ page? Inspector shows 404 on all css and js files and they are pointing to /admin/resources/* Been searching around and it doesn't seem to be a ...
2
votes
1answer
1k views

Nginx Vhost Config - Get page based on translated URI and without parameters in url [duplicate]

I have a localized site, localization works fine for homepage (/en/), however the links to other page does not work (/en/rooms) where /chambres works fine for default language. The English 'chambres' ...
2
votes
1answer
282 views

Change the name of 'CraftSessionId' from HTTP header requests?

I am running a Nginx server and tried to hide the 'Set-Cookie' parameter from the HTTP header output when using curl -I hostname.com - I applied the Nginx configuration using: proxy_hide_header Set-...