Questions tagged [nginx]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
170 views

Nginx Config to serve .json without CORS restriction with ddev

I have Craft 4 installed and use it locally with ddev. Ddev uses nginx in my case and I want to enable serving .json files from a subdirectory within /web. What do I have to add to the nginx.conf file?...
Merc's user avatar
  • 211
0 votes
0 answers
89 views

GraphQL send Authorization headers with nginx

I am trying to write some mutations via GraphQL. For that I need to authenticate via headers. In this case I want to send an authorization header like Authorization: Bearer xxxxxx-my-token-xxxxx The ...
Merc's user avatar
  • 211
0 votes
1 answer
1k views

Configuring Nginx with Azure Linux Web App (PHP 8, Craft 4)

Attempting to update an Azure Linux Web App to Craft 4. So I updated the Linux Web App to PHP 8. But now it’s using Nginx instead of Apache (would have been nice to know they change that when you ...
M Smith's user avatar
  • 150
1 vote
1 answer
261 views

Use NGINX to proxy a Craft CMS site hosted on apache into an existing site

I have a Craft CMS blog site that is hosted on an apache web server. I would like to proxy that site to my Flask-based web app at http://example.com/blog/ where http://example.com is the main URL for ...
David A McInnis's user avatar
0 votes
0 answers
70 views

Need help: multiple request throttling

I have an issue in the CraftCMS back office when I try to export all entries. When I try to export all the entries in expanded mode it takes ~1min but every minute the back office send another ...
Antoine Maillard's user avatar
0 votes
0 answers
46 views

How to get the nginx deny functionality to work for Heroku using heroku-buildpack-nginx?

I am a novice to Nginx, but I have my app hosted on Heroku and I am using heroku-buildpack-nginx to add Nginx on my project. There is a Fastly layer in front of the app, but I am trying to use Nginx's ...
abaird's user avatar
  • 1
1 vote
1 answer
406 views

Setting up load balancing for Craft on Laravel Forge

I'm attempting to set up a load balancing set up on laravel forge for a craft site. I have one server that is provisioned as a load balancer, two app servers both set up to server the same craft ...
Johnronomous Bosch's user avatar
1 vote
0 answers
50 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 ...
CreateSean's user avatar
  • 1,963
1 vote
2 answers
352 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 ...
Jim's user avatar
  • 139
1 vote
0 answers
140 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 '...
mijewe's user avatar
  • 336
1 vote
1 answer
50 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|...
Rob Lefort's user avatar
1 vote
1 answer
375 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 ...
mijewe's user avatar
  • 336
1 vote
0 answers
105 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 ...
Andreas's user avatar
  • 491
1 vote
2 answers
791 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; ...
Vitaliy  Badalov's user avatar
1 vote
1 answer
591 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 ...
Chris's user avatar
  • 137
1 vote
2 answers
4k 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 ...
hisnameisjimmy's user avatar
1 vote
1 answer
112 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!
Mike 's user avatar
  • 33
1 vote
1 answer
327 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 ...
user7868's user avatar
1 vote
2 answers
2k 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 ...
Will Browar's user avatar
0 votes
1 answer
619 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'...
Stuart McCoy's user avatar
2 votes
2 answers
591 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....
Clark Nelson's user avatar
0 votes
1 answer
637 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'...
Youniteus's user avatar
  • 250
1 vote
1 answer
220 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 ...
Vin's user avatar
  • 373
1 vote
1 answer
879 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 ...
Mike F's user avatar
  • 185
2 votes
1 answer
592 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 ...
Adam Irinaga's user avatar
4 votes
2 answers
1k 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://...
Anya Dit's user avatar
  • 356
1 vote
0 answers
534 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|...
Adam I's user avatar
  • 11
0 votes
2 answers
619 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 ...
Michael Purvis's user avatar
1 vote
1 answer
1k 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: ...
Johannes's user avatar
  • 740
1 vote
1 answer
9k 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. ...
hvs's user avatar
  • 283
2 votes
2 answers
1k 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-...
Colin's user avatar
  • 31
1 vote
1 answer
6k 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: ...
Tim Kelty's user avatar
  • 3,071
3 votes
2 answers
538 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 ...
Alan Ivey's user avatar
  • 131
2 votes
1 answer
199 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 ...
Alex's user avatar
  • 21
0 votes
1 answer
1k 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'] ...
ChaiTea's user avatar
  • 95
2 votes
1 answer
2k 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/...
danpaquette's user avatar
2 votes
3 answers
1k 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....
Marion Newlevant's user avatar
0 votes
1 answer
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 ...
Chris Southam's user avatar
3 votes
2 answers
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 ...
Jon's user avatar
  • 345
2 votes
1 answer
2k 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/...
thecommoner's user avatar
2 votes
0 answers
394 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 ...
Jeremy P's user avatar
5 votes
2 answers
2k 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 ...
Moshe's user avatar
  • 239
2 votes
2 answers
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 ...
Matt Stein's user avatar
  • 3,996
0 votes
1 answer
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/...
Matthew T's user avatar
1 vote
1 answer
752 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 ...
Mathieu P.'s user avatar
5 votes
1 answer
16k 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, ...
Jason D's user avatar
  • 1,132
1 vote
1 answer
563 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 /...
user814584's user avatar
2 votes
2 answers
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 ...
Dave Yoon's user avatar
2 votes
1 answer
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' ...
maunoxyd's user avatar
  • 301
2 votes
1 answer
341 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-...
Jason McCallister's user avatar