Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non apache webserver #23

Closed
fanningert opened this issue Mar 9, 2014 · 3 comments
Closed

Support non apache webserver #23

fanningert opened this issue Mar 9, 2014 · 3 comments

Comments

@fanningert
Copy link
Contributor

Really a great blog tool. But please support non apache webserver (lighttpd, nginx, ...)
What I see is that at the moment the .htaccess files are the problems.

for one .htaccess i have the solution.
~/config/.htaccess

deny from all

lighttpd config

$HTTP["url"] =~ "^/config" {
  url.access-deny = ( "" )
}

Regards Thomas

@danpros
Copy link
Owner

danpros commented Mar 10, 2014

Hi Thomas,

Thanks, we have huge time differences here 😄

Not tested yet for lighttpd but I already tested it on Nginx, below is the basic configuration for default.conf:

server {
  listen 80;

  server_name example.com www.example.com;
  root /usr/share/nginx/html;

  access_log /var/log/nginx/access.log;
  error_log /var/log/nginx/error.log error;

  index index.php;

  location ~ /config/ {
     deny all;
  }

  location / {
    try_files $uri $uri/ /index.php;
  }

  location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME   $document_root$fastcgi_script_name;
        include        fastcgi_params;
  }
}

Change the root to your needs. We should improve/create wiki page for server configurations etc.

Regards,

@fanningert
Copy link
Contributor Author

Here a working config for lighttp.
Not perfect, but working. HTMLy is in the root directory in this example

$HTTP["url"] =~ "^/config" {
  url.access-deny = ( "" )
}

url.rewrite-once = (
  "^/(themes|system|vendor)/(.*)" => "$0",
  "^/(.*\.php)" => "$0",

  # Everything else is handles by Wordpress
  "^/(.*)$" => "/index.php/$1"
)

@danpros
Copy link
Owner

danpros commented Mar 10, 2014

Thanks Thomas,

I updating the default.conf for Nginx, block any access to config folder. I should creating docs on the official site, the logo is coming soon and I will releasing new version for that.

Update: let me know if you have any idea etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants