Re: Using "Pretty" permalinks with httpd in wordpress

2017-01-09 Thread Gregory Edigarov

On 06.01.17 15:42, Atanas Vladimirov wrote:

On 06.01.2017 13:35, Jiri B wrote:

On Fri, Jan 06, 2017 at 01:32:10PM +0200, Atanas Vladimirov wrote:

Hi,

I can't figure it out.
Is it possible to use Wordpress with OpenBSD httpd and configure both
for "Pretty" permalinks.
Does anyone have a working setup?
Thanks for your time,
Atanas


Help testing this diff 
http://marc.info/?l=openbsd-tech&m=148370177214134&w=2


j.

I know about the diff and I'm testing it right now.
The problem is that I really don't know what to put in
httpd.conf.
I try to "translate" Wordpress .htaccess with no luck:

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
^^^ this rule doesn't rewrite index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
^^^ this rule rewrites any single character to /index.php
if %{REQUEST_FILENAME} is not a real file or directory

# END WordPress

Do I read/understand the .htaccess file correctly?
In my httpd.conf:
.
# art-katerina.com
server "art-katerina.com" {
listen on * tls port 443
alias www.art-katerina.com
directory index index.php
root "/domains/art-katerina.com/"
hsts
log {
access "art-katerina-access.log",
error "art-katerina-error.log",
style combined
}
location "/.well-known/acme-challenge/*" {
root "/acme"
root strip 2
}
tls {
certificate 
"/etc/ssl/acme/art-katerina.com/fullchain.pem"

key "/etc/ssl/acme/private/art-katerina.com/privkey.pem"
}
location "*.php" {
fastcgi socket "/run/php-fpm.sock"
}
location match "(.)" {
pass rewrite "/index.php"
fastcgi socket "/run/php-fpm.sock"
}
you seem to be wrong here.  location match "(.)"   mean exactly 
_ONE_ single character.  may be you mean location match "(.+)"

.




Re: Using "Pretty" permalinks with httpd in wordpress

2017-01-06 Thread Ax0n
This was my hack.
http://www.h-i-r.net/2016/04/pretty-wordpress-permalinks-under.html

tl;dr:
1) ln -s index.php posts
2) null out "security.limit_extensions" in the php_fpm config, restart FPM.
Beware the potential abuses of this.
3) Set up an explicit location clause for "/posts*" that uses the fastcgi
socket for FPM.
4) Configure wordpress permalinks with a custom structure that includes
/posts


On Fri, Jan 6, 2017 at 7:42 AM, Atanas Vladimirov  wrote:

> On 06.01.2017 13:35, Jiri B wrote:
>
>> On Fri, Jan 06, 2017 at 01:32:10PM +0200, Atanas Vladimirov wrote:
>>
>>> Hi,
>>>
>>> I can't figure it out.
>>> Is it possible to use Wordpress with OpenBSD httpd and configure both
>>> for "Pretty" permalinks.
>>> Does anyone have a working setup?
>>> Thanks for your time,
>>> Atanas
>>>
>>
>> Help testing this diff http://marc.info/?l=openbsd-te
>> ch&m=148370177214134&w=2
>>
>> j.
>>
> I know about the diff and I'm testing it right now.
> The problem is that I really don't know what to put in
> httpd.conf.
> I try to "translate" Wordpress .htaccess with no luck:
>
> # BEGIN WordPress
> 
> RewriteEngine On
> RewriteBase /
> RewriteRule ^index\.php$ - [L]
> ^^^ this rule doesn't rewrite index.php
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule . /index.php [L]
> ^^^ this rule rewrites any single character to /index.php
> if %{REQUEST_FILENAME} is not a real file or directory
> 
> # END WordPress
>
> Do I read/understand the .htaccess file correctly?
> In my httpd.conf:
> .
> # art-katerina.com
> server "art-katerina.com" {
> listen on * tls port 443
> alias www.art-katerina.com
> directory index index.php
> root "/domains/art-katerina.com/"
> hsts
> log {
> access "art-katerina-access.log",
> error "art-katerina-error.log",
> style combined
> }
> location "/.well-known/acme-challenge/*" {
> root "/acme"
> root strip 2
> }
> tls {
> certificate "/etc/ssl/acme/art-katerina.com/fullchain.pem"
> key "/etc/ssl/acme/private/art-katerina.com/privkey.pem"
> }
> location "*.php" {
> fastcgi socket "/run/php-fpm.sock"
> }
> location match "(.)" {
> pass rewrite "/index.php"
> fastcgi socket "/run/php-fpm.sock"
> }
> .



Re: Using "Pretty" permalinks with httpd in wordpress

2017-01-06 Thread Atanas Vladimirov

On 06.01.2017 13:35, Jiri B wrote:

On Fri, Jan 06, 2017 at 01:32:10PM +0200, Atanas Vladimirov wrote:

Hi,

I can't figure it out.
Is it possible to use Wordpress with OpenBSD httpd and configure both
for "Pretty" permalinks.
Does anyone have a working setup?
Thanks for your time,
Atanas


Help testing this diff 
http://marc.info/?l=openbsd-tech&m=148370177214134&w=2


j.

I know about the diff and I'm testing it right now.
The problem is that I really don't know what to put in
httpd.conf.
I try to "translate" Wordpress .htaccess with no luck:

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
^^^ this rule doesn't rewrite index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
^^^ this rule rewrites any single character to /index.php
if %{REQUEST_FILENAME} is not a real file or directory

# END WordPress

Do I read/understand the .htaccess file correctly?
In my httpd.conf:
.
# art-katerina.com
server "art-katerina.com" {
listen on * tls port 443
alias www.art-katerina.com
directory index index.php
root "/domains/art-katerina.com/"
hsts
log {
access "art-katerina-access.log",
error "art-katerina-error.log",
style combined
}
location "/.well-known/acme-challenge/*" {
root "/acme"
root strip 2
}
tls {
certificate 
"/etc/ssl/acme/art-katerina.com/fullchain.pem"

key "/etc/ssl/acme/private/art-katerina.com/privkey.pem"
}
location "*.php" {
fastcgi socket "/run/php-fpm.sock"
}
location match "(.)" {
pass rewrite "/index.php"
fastcgi socket "/run/php-fpm.sock"
}
.



Re: Using "Pretty" permalinks with httpd in wordpress

2017-01-06 Thread Jiri B
On Fri, Jan 06, 2017 at 01:32:10PM +0200, Atanas Vladimirov wrote:
> Hi,
> 
> I can't figure it out.
> Is it possible to use Wordpress with OpenBSD httpd and configure both
> for "Pretty" permalinks.
> Does anyone have a working setup?
> Thanks for your time,
> Atanas

Help testing this diff http://marc.info/?l=openbsd-tech&m=148370177214134&w=2

j.



Using "Pretty" permalinks with httpd in wordpress

2017-01-06 Thread Atanas Vladimirov

Hi,

I can't figure it out.
Is it possible to use Wordpress with OpenBSD httpd and configure both
for "Pretty" permalinks.
Does anyone have a working setup?
Thanks for your time,
Atanas