[users@httpd] Access forbidden to wordpress tinymce loader

2017-01-12 Thread Lester Caine
I'm trying to recover a wordpress website for a customer and get it
working on one of my servers after his original hosting company decided
to block the site. We have the content and a copy of wordpress
application it was working with, and almost everything is now sorted
with a new domain name, but the tinymce editor is proving difficult.

There is a php script to load the tinymce js files, but it is located in
an area where .htaccess limits access so I'm getting a 403 error and no
editor on the page. I've sort of convinced myself that it's down to some
difference between Apache 2.2 and 2.4 as the wordpress .htaccess file
was very 2.2 like so I've fixed that ...

Contemplating what to write is always helpful ... There was a .htaccess
file in the wp-includes folder which still had a mix of 2.2 and 2.4
format settings with a 2.2 setting for wp-tinymce.php ... but the
tinymce language files were enabled in the root .htaccess :(

Posting anyway for reference as all the google searches were giving
solutions at a total tangent to the actual bug and I'd spent 2 hours
trying to track the problem!

-- 
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Httpd-2.4.23 not creating .so file

2017-01-12 Thread Yann Ylavic
On Thu, Jan 12, 2017 at 7:44 AM, Hemant Chaudhary
 wrote:
> Hi
>
> I am porting httpd-2.4.23 on nonstop tandem. But .so file is not created in
> modules, hence I am unable to start apache.
>
> Only .a and .la of modules are present in module folder.
>
> Is it possible to start httpd-2.4.23 without .so file of modules ? If not
> then how to create .so file.
>
> My configure command - ./configure   --with-included-apr
> --with-pcre=/home/hemant/apache/httpd-2.4.23/srclib/pcre
> --prefix=/home/hemant/apache

You should be able to link the modules statically with
--enable-mods-static="module1 module2..." (where "module1" is the name
of some module without mod_ prefix, e.g. "rewrite" or "proxy"), or
some predefined set with --enable-mods-static=few|most|all.

Then the "LoadModule" in httpd.conf are not needed.

Regards,
Yann.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Httpd-2.4.23 not creating .so file

2017-01-12 Thread Yann Ylavic
On Thu, Jan 12, 2017 at 11:42 AM, Yann Ylavic  wrote:
> On Thu, Jan 12, 2017 at 7:44 AM, Hemant Chaudhary
>  wrote:
>> Hi
>>
>> I am porting httpd-2.4.23 on nonstop tandem. But .so file is not created in
>> modules, hence I am unable to start apache.
>>
>> Only .a and .la of modules are present in module folder.
>>
>> Is it possible to start httpd-2.4.23 without .so file of modules ? If not
>> then how to create .so file.
>>
>> My configure command - ./configure   --with-included-apr
>> --with-pcre=/home/hemant/apache/httpd-2.4.23/srclib/pcre
>> --prefix=/home/hemant/apache
>
> You should be able to link the modules statically with
> --enable-mods-static="module1 module2..." (where "module1" is the name
> of some module without mod_ prefix, e.g. "rewrite" or "proxy"), or
> some predefined set with --enable-mods-static=few|most|all.
>
> Then the "LoadModule" in httpd.conf are not needed.

But if your system is usually able to link dynamically (ELF/.so is
handled), maybe you should force --enable-so and could then use
--enable-mods-shared="...".

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[users@httpd] Solved - WebSocket connections, reverse proxy, MacOS Server 5.2, django channels

2017-01-12 Thread Adam Teale
In case someone finds themselves in a similar situation here is how I got
​W
eb
​S
ocket connections working via Apache
​ in MacOS Server 5.2​
.
And the solution
​i​
s simple.

---
*The short version:​*

​I use MacOS Server 5.2 (ships with Apache 2.4.23) to run a python Django
application via the mod_wsgi module.

I ha
d
 been trying to setup proxypass and wstunnel
​ in MacOS 10.12 & Server 5.2 to handle websocket connections via an ASGI
interface server called Daphne running on localhost on port 8001.​

I wanted to reverse proxy any WebSocket connection to
wss://myapp.local/chat/stream/ to ws://localhost:8001/chat/stream/

​From what I had read on all the forums and mailing lists that I had
scoured was to simply make some proxypass definitions in the appropriate
virtual host and make sure that the mod_proxy and mod_proxy_wstunnel
modules were loaded and it would work.

Long story short - from what I understand all
​of ​
this trouble came down to MacOS Server 5 and one major change:
"A single instance of httpd runs as a reverse proxy, called the Service
Proxy, and several additional instances of httpd run behind that proxy to
support specific HTTP-based services, including an instance for the
Websites service."

All I need
​ed​
 to do
​ to proxy the websocket connection​
 was the following:

in:
/Library/Server/Web/Config/Proxy/apache_serviceproxy.conf

​Add
 (around line 297 (in the section about user websites, webdav):
   ProxyPass / http://localhost:8001/
   ProxyPassReverse / http://localhost:8001/

   RewriteEngine on
   RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
   RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
   RewriteRule .* ws://localhost:8001%{REQUEST_URI} [P]


​I then k
icked over the service proxy:
sudo launchctl unload -w /Applications/Server.app/Conte
nts/ServerRoot/System/Library/LaunchDaemons/com.apple.serviceproxy.plist
sudo launchctl load -w /Applications/Server.app/Conte
nts/ServerRoot/System/Library/LaunchDaemons/com.apple.serviceproxy.plist

​And the web socket connections ​were instantly working!


​*The long version:​ *

For many weeks I have been trying to get WebSocket connections functioning
with Apache and Andrew Godwin's Django Channels
 project in an app I am
developing.

Django Channels is "a project to make Django able to handle more than just
plain HTTP requests, including WebSockets and HTTP2, as well as the ability
to run code after a response has been sent for things like thumbnailing or
background calculation."

My interest in Django Channels came from my requirement of a chat system in
my webapp. After watching a several of Andrew's demos on youtube and having
read through the docs and eventually installing Andrew's demo django
channels  project I
figured I would be able to get this working in production on our MacOS
Server.

The current release of MacOS 10.12 and Server 5.2 ships with Apache 2.4.23.
This comes with the necessary mod_proxy_wstunnel module to be able to proxy
WebSocket connections (ws:// and secure wss://) in Apache and is already
loaded in the server config file:


/Library/Server/Web/Config/apache2/httpd_server_app.conf


Daphne
 is
Andrew's ASGI interface server that supports WebSockets & long-poll HTTP
requests. WSGI does not.


With Daphne running on localhost on a port that MacOS isn't occupying (i
went with 8001) the idea was to get Apache to reverse proxy certain
requests to Daphne.

Daphne can be run on a specified port (8001 in tis example) like so (-v2
for more feedback):
daphne -p 8001 yourapp -v2

I wanted Daphne to handle only the web socket connections (as I use
currently depend on some apache modules for serving media such as
mod_xsendfile). In my case the websocket connection was via /chat/stream/
based on Andrew's demo project.

>From what I had read in MacOS Server's implementation of Apache the idea is
to declare these proxypass commands inside the virtual host files of your
"sites" in:
/Library/Server/Web/Config/apache2/sites/
In config files such as:
_127.0.0.1_34543_.conf
I did also read that any customisation for web apps running on MacOS Server
should be made to the plist file for the required web app in:
/Library/Server/Web/Config/apache2/webapps/
In a plist file such as:
com.apple.webapp.wsgi.plist
Anyway...

I edited the _127.0.0.1_34543_.conf file adding:
   ProxyPass /chat/stream/ ws://localhost:8001/ 
   ProxyPassReverse /chat/stream/ ws://localhost:8001/


Eager to test out my first web socket chat connection I refreshed the page
only to see an error printed in the apache log:

No protocol handler was valid for the URL /chat/stream/. If you are using a
DSO version of mod_proxy, make sure the proxy submodules are included in
the configuration using LoadModule.

Re: [users@httpd] Access forbidden to wordpress tinymce loader

2017-01-12 Thread Yehuda Katz
You haven't given quite enough information for someone to help you.
Is there anything in the error log?
Can you post the relevant .htaccess files?

Absent that, the best we probably can do is point you to the 2.2->2.4
migration documentation: http://httpd.apache.org/docs/2.4/upgrading.html

- Y

On Thu, Jan 12, 2017 at 5:39 AM, Lester Caine  wrote:

> I'm trying to recover a wordpress website for a customer and get it
> working on one of my servers after his original hosting company decided
> to block the site. We have the content and a copy of wordpress
> application it was working with, and almost everything is now sorted
> with a new domain name, but the tinymce editor is proving difficult.
>
> There is a php script to load the tinymce js files, but it is located in
> an area where .htaccess limits access so I'm getting a 403 error and no
> editor on the page. I've sort of convinced myself that it's down to some
> difference between Apache 2.2 and 2.4 as the wordpress .htaccess file
> was very 2.2 like so I've fixed that ...
>
> Contemplating what to write is always helpful ... There was a .htaccess
> file in the wp-includes folder which still had a mix of 2.2 and 2.4
> format settings with a 2.2 setting for wp-tinymce.php ... but the
> tinymce language files were enabled in the root .htaccess :(
>
> Posting anyway for reference as all the google searches were giving
> solutions at a total tangent to the actual bug and I'd spent 2 hours
> trying to track the problem!
>
> --
> Lester Caine - G8HFL
> -
> Contact - http://lsces.co.uk/wiki/?page=contact
> L.S.Caine Electronic Services - http://lsces.co.uk
> EnquirySolve - http://enquirysolve.com/
> Model Engineers Digital Workshop - http://medw.co.uk
> Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>