7
votes
Accepted
omitScriptNameInUrls is not working
On recent Ubuntu systems (for sure on 14.04), mod_rewrite is installed but not enabled within Apache. You may just need to enable the rewrite module and restart Apache.
$ sudo a2enmod rewrite
$ sudo ...
7
votes
How do I redirect traffic from a legacy category URL to a new category URL?
There are a few plugins which can handle this, but Retour is the newest and shiniest!
https://github.com/nystudio107/retour
It's from the same developer as SEOmatic... he puts a lot of love & ...
7
votes
Accepted
No input file specified - [proxy_fcgi:error] Got error 'Unable to open primary script: [PATH]/html/index.php (No such file or directory)\n'
It turned out that the problem was from customizing the domain's document root in the userdata files and then the PHP-FPM configuration had not been rebuilt and the service not restarted. The ...
6
votes
Accepted
How do I redirect traffic from a legacy category URL to a new category URL?
Craft has a twig redirect tag.
You should be able to create a "redirect" template that handles redirects based on {slug} and/or url segments and then use Craft routes to direct "legacy-subdirectory"...
6
votes
Accepted
Site loads funny
This looks like a problem with your DocumentRoot config option.
If you have access to your Apache VirtualHost configuration, you should append /public to your DocumentRoot.
If you're configuring the ...
6
votes
Apache or Nginx for a Craft site
Putting aside Craft for a moment, it's not just Craft, you'll usually end up throwing more things on a web server as time goes by. If those scripts/apps are expecting an .htaccess file and you're ...
6
votes
Apache or Nginx for a Craft site
There is no "this over that" for Craft specifically. Your own statement "it depends" plays a big role. I would read this pretty extensive post on DigitalOcean "Apache vs Nginx: Practical ...
5
votes
Accepted
Problems setting up a local site
You can't use the domain .dev anymore, it's Google's gTLD (https://icannwiki.org/.dev) and they don't want to share. See https://medium.engineering/use-a-dev-domain-not-anymore-95219778e6fd for a ...
5
votes
Accepted
Anyone with a tricked out .htaccess file
Been using this one for years, works great:
<IfModule mod_rewrite.c>
RewriteEngine On
# ========================================= #
# Force website to use "www"
RewriteCond %{...
5
votes
Accepted
Craft Admin assets do not load over https (Apache & Cloudflare)
The solution I came to was creating an Origin Certificate on Cloudflare, installing on it on my VPS, and setting the SSL setting to Full Strict. Now admin assets are loading perfectly over https. No ....
5
votes
Accepted
Craft hangs when updating entry
It turns out that I was running a dev release of PHP 5.6 from a PPA and not the official Ubuntu release. With Brad Bell's help (thank you so much!) I got on the right track to looking into PHP and ...
4
votes
Accepted
Ajax Post to guestEntries/saveEntries from another domain
TL;DR: Turns out this was an issue with my apache config on the Craft instance.
Explanation: I did a little digging around the GuestEntriesController.php file and noticed that Craft was not picking ...
3
votes
Security test generated large compiled_templates directory, site outage
I don't have specific answers to your questions, but that's mainly because I feel there are some clarifications and observations that I think might be more helpful.
The thread you linked to is ...
3
votes
Anyone with a tricked out .htaccess file
Since you mentioned in an earlier post that you are performance-minded, this might interest you: Stop using .htaccess files! No, really.
3
votes
Can't access admin panel
I had the same issue on my mac and struggled for hours.
Having the right .htaccess file in place was key, but if you are not getting Craft's error messages, that's a sign your .htaccess file is not ...
3
votes
Apache vs IIS - reasons for either
Apache is generally hosted on Linux which the vast majority of web hosting services use. IIS is Microsofts platform and is much more difficult to set up as well as less common with hosting providers.
...
2
votes
Accepted
Using a virtual host result in internal error
Looks like the .htaccess file included with Craft is not being read or you didn't rename it (should be .htaccess with the period at the beginning).
That's why /index.php/admin is working but /admin/ ...
2
votes
Locale case sensititvity on AWS instance
Oh, I am blind.
Rather than delete this embarrassment, I will post this mea culpa for anyone else that may experience a similar brain fart.
I had subconsciously typed the directories in html/ using ...
2
votes
After migration to staging, requesting any page other than Home results in 500 error
This is solved by this thread.
The common thread here is Rackspace Cloud Sites, which apparently needs a RewriteBase / instruction in .htaccess.
Thanks @maxx and @christopher-healey
2
votes
Can't access admin panel
As Brad Bell pointed out in a comment that you should use index.php, it might have something to do with your .htaccess and general.php
Your .htaccess File should look something similair to this:
<...
2
votes
Cannot omit index.php from URL
I have found the solution within the answered question:
omitScriptNameInUrls is not working
'sudo a2enmod rewrite' was needed!
Thanks all.
2
votes
Can't get Craft running on Heroku
I solved it.
I needed to remove calls to 'server' and 'http' in my enginx_app.conf file. Now the file only makes calls to 'location'.
2
votes
Accepted
Optimizing With Http2 In Mind
So... just to be clear. This /style.css is a static asset, it's not sitting in the craft/templates folder, right?
Assuming that's the case, something is definitely wrong if https is taking 2 seconds ...
2
votes
Accepted
When saving an Entry, I receive a JSON response rather than returning to the Entry's edit page
IMO, the issue is with this line.
SetEnv HTTP_ACCEPT text/html,application/xhtml+xml,application/xml,application/json;q=0.9,*/*;q=0.8
With ACCEPT headers set to a fixed value, it's impossible for ...
2
votes
Accepted
Admin and Dashboard showing 404
In my case, my url routing wasn't functional because the mod_rewrite module in Apache was disabled. I enabled it with a2enmod, restarted Apache, and my problem was solved.
1
vote
Making a base url without /public
This is not so much a Craft question as a web server question.
The directory structure of Craft is intended for the web server to have the public (or web in Craft 3) directory configured as the ...
1
vote
Accepted
Installing Craft in a Sub Folder
Ok I actually managed to fix this. I moved the index.php file from the cms/public subfolder to public_html and it worked a treat. I had to change the following code:
// Path to your craft/ folder
$...
1
vote
Accepted
Craft cacheMethod setting is being overridden
The craft/config/memcache.php file has nothing to do with where PHP sessions are stored. It is for Craft's general purpose data caching.
If you want to save PHP session in memcache, you'll need to ...
1
vote
Accepted
HTTPs Site - Redirects Go to HTTP First & Then HTTPs
Think we figured out the root cause of this - we have a load balancer in front of our origin server and, long story short, that load balancer was communicating with our origin server via HTTP, causing ...
1
vote
Craft Admin assets do not load over https (Apache & Cloudflare)
Craft's default setting is 'resourceBaseUrl' => '@web/cpresources'. If your site or Docker Container runs http, Craft seems to (correctly) determine the http setup. This is why it ignores your ...
Only top scored, non community-wiki answers of a minimum length are eligible