File Manager of CKEditor WolfCMS not working with Nginx - apache

I migrated a WolfCMS from Apache to Nginx. Everything is working fine except for the CKEditor File Manager plugin. When opening the browser server box of CKEditor I am seeing No input file specified. All other friendly URLs, rewrites are working without any issues. So I assume the issue is related to a wrong Nginx configuration.
These are the Apache rewrites:
RewriteEngine On
# Set next line to your Wolf CMS root - if not in subdir, then just /
#RewriteBase /wolfcms/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
# Main URL rewriting.
RewriteRule ^(.*)$ index.php?WOLFPAGE=$1 [L,QSA]
For Nginx the docs just state:
#Put the following code in your server block:
try_files $uri $uri/ /index.php?WOLFPAGE=$uri&$args;
And that is what I did. The file manager URL that is not working in Nginx is:
/wolf_ckeditor/filemanager/index.php?type=Images&CKEditor=part_0_content&CKEditorFuncNum=1&langCode=de
=> Leading to No input file specified.
Any suggestions on how I could modify my Nginx config to get this working again?

Related

vue-router url paths are giving a 404 in production with nodejs

I am attempting to deploy a multipage vue3 frontend to an application. It works fine in development mode, but in production, when I attempt to navigate to a url via the search bar -- e.g. https://mywebsite.com/customers, I get a 404.
I am able to fix this by redirecting to the homepage using the suggestion on vue-router's documentation, but then it just goes to the homepage rather than showing the actual page I would like to visit. Is there some way around this that I am missing? An additional step or does this suggest I am misconfiguring this somehow?
I solved this by setting up the server. You need to understand what server you have installed. Go to config update and restart the server.
Here are the Server Configurations
Apache
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
nginx
location / {
try_files $uri $uri/ /index.html;
}

Codeigniter 404 page not found

I have been developing a Codeigniter website locally for with a WAMP server on Windows, everything working fine. I uploaded the files to a Ubuntu server to a virtual directory and configuration the URL and .htaccess. The rewrite rule works like it should but now I get 404 when I try to access the site or any other controller link. The logs state that it cannot find the controller, I checked the files to make sure they were uploaded correctly.
At this point and I at a loss, I have a hunch that it is a configuration issue with Apache but I have checked all the configs that I know. What would cause a 404 error?
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Removes index.php from ExpressionEngine URLs
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteCond %{REQUEST_URI} !/system/.* [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
# Directs all EE web requests through the site index file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>
You have activated the module rewrite? If not, turn it on and restart wamp.
Also try to put index.php before the controller, may resolve the problem.
In CI 3.0, All Class names must have the first letter capitalized with the rest of the name lowercase.
Example: Where Model_name is the name of your class, this is how the class should be;
class User_model extends CI_Model {
public function __construct()
{
parent::__construct();
}
}
Then, the model should be loaded like this in the controller;
$this->load->model('user_model');
Please refer to this link: http://www.codeigniter.com/userguide3/general/models.html

How to set default home page in apache

I have several folders and pages on my site and it's working well while calling it directly (like mydomain.com/forum or mydomain/tmp/file.html).
But when calling just mydomain.com apache tries to find mydomain/index.html/ folder, while there is index.html file in the root directory and no index.html folder. As the result 404 error. Where to change apache settings? (only .htaccess available, it's virtual hosting)
Most likely there is some rule adding trailing slash. You can use this code in your DOCUMENT_ROOT/.htaccess file to remove a trailing slash:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ /$1 [R=302,L,NE]

Convert htaccess rules routing paths to index.php to nginx

I'm new to nginx, but I'm trying to convert
# Disallows file browsing
Options -Indexes
# Custom Error Pages
ErrorDocument 403 /error-docs/403.php
ErrorDocument 404 /error-docs/404.php
ErrorDocument 500 /error-docs/500.php
# Turn on the Apache Rewrite Engine
RewriteEngine On
#Conditional to see if it is a real file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# If not then pass the query string to index.php and stop any further rules
RewriteRule (.*) index.php/$1 [PT,L]
to nginx syntax. I've tried the suggestion at Routing requests through index.php with nginx but it doesn't do quite what I need it to do. I've also tried the auto converters http://winginx.com/en/htaccess and http://www.anilcetin.com/ but the rules they output don't work for me either. Any help is appreciated.
The issue I had was actually related to my PHP and MySQL code.
location / {
try_files $uri $uri/ /index.php$args;
}
works fine. Thanks for the link.

mod-rewrite to ignore the subdomain

I'm using a mod-rewrite for pretty URLs, meant to run on the domain root. Working fine but now I'm trying to make it run on a subdomain and it keeps giving "500 Internal Server Error".
The subdomain automatically redirects to the folder with that name on my hosting account (sub.domain.com shows the content of domain.com/sub/). Does it fail because this request is already being mod-rewritten automatically or can I simply change something in the htaccess to address the subdomain instead?
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
Contact your ISP and check if they are setting the DocumentRoot for the sub domains to the /domain/sub/ directory (it's probable) or alternatively using an internal RewriteRule to direct traffic to that directory (you can see if there's an external rewrite / redirect in place via Chrome or Firefox + firebug, use the developer tools to check the response header, on the network Tab). If they have set the document root you will need to copy or symbolically link ALL the files you want accessible via the sub-domain, to the /domain.com/sub/ directory e.g. the .htaccess, index.php, images, js and css files and sub directories. If they are using an internal rewrite, a quick tweak to your own existing internal rewrite, in the existing .htaccess file, should suffice e.g.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]