Hi, Currently, I use a nginx configuration for mailman. It's work perfectly.
I tried to do the same with Apache, but the statics files are not delivered (404).
Basically, it's the same configuration:
/server {
listen 80; server_name mailing.ddd.fr;
access_log /var/log/nginx/mailing.access.log; error_log /var/log/nginx/mailing.error.log;
location /static/ { alias /opt/mailman/static/; expires 30d; }
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
location / { proxy_pass http://localhost:8000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } }
<VirtualHost *:80> ServerName mailing.ddd.fr
ErrorLog ${APACHE_LOG_DIR}/mailing.error.log CustomLog ${APACHE_LOG_DIR}/mailing.access.log combined
<Location /static/> Alias "/opt/mailman/static/" </Location>
<Location /> ProxyPass http://localhost:8000/ ProxyPassReverse http://localhost:8000/ ProxyPreserveHost On </Location> </VirtualHost>/
I missed something ?
Thanks.
On 10/19/18 10:29 AM, Guiseppin Thomas wrote:
Hi, Currently, I use a nginx configuration for mailman. It's work perfectly.
I tried to do the same with Apache, but the statics files are not delivered (404). ... <VirtualHost *:80> ServerName mailing.ddd.fr
ErrorLog ${APACHE_LOG_DIR}/mailing.error.log CustomLog ${APACHE_LOG_DIR}/mailing.access.log combined
<Location /static/> Alias "/opt/mailman/static/" </Location>
<Location /> ProxyPass http://localhost:8000/ ProxyPassReverse http://localhost:8000/ ProxyPreserveHost On </Location> </VirtualHost>/
In Apache, location <http://httpd.apache.org/docs/2.4/mod/core.html#location> is not appropriate for resources in the file system.
Try
Alias /static/ /opt/mailman/static/
not within a location block.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi tried both.
Same result.
xxxx - - [19/Oct/2018:21:14:22 +0200] "GET /static/postorius/js/script.js HTTP/1.1" 404 4051 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"
Le ven. 19 oct. 2018 à 18:59, Mark Sapiro <mark@msapiro.net> a écrit :
On 10/19/18 10:29 AM, Guiseppin Thomas wrote:
Hi, Currently, I use a nginx configuration for mailman. It's work perfectly.
I tried to do the same with Apache, but the statics files are not delivered (404). ... <VirtualHost *:80> ServerName mailing.ddd.fr
ErrorLog ${APACHE_LOG_DIR}/mailing.error.log CustomLog ${APACHE_LOG_DIR}/mailing.access.log combined <Location /static/> Alias "/opt/mailman/static/" </Location> <Location /> ProxyPass http://localhost:8000/ ProxyPassReverse http://localhost:8000/ ProxyPreserveHost On </Location>
</VirtualHost>/
In Apache, location <http://httpd.apache.org/docs/2.4/mod/core.html#location> is not appropriate for resources in the file system.
Try
Alias /static/ /opt/mailman/static/
not within a location block.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
On Fri, Oct 19, 2018, at 12:17 PM, Thomas G wrote:
Hi tried both.
Same result.
xxxx - - [19/Oct/2018:21:14:22 +0200] "GET /static/postorius/js/script.js HTTP/1.1" 404 4051 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"
And, you have verified that the files exist at /opt/mailman/static
on your host?
Le ven. 19 oct. 2018 à 18:59, Mark Sapiro <mark@msapiro.net> a écrit :
On 10/19/18 10:29 AM, Guiseppin Thomas wrote:
Hi, Currently, I use a nginx configuration for mailman. It's work perfectly.
I tried to do the same with Apache, but the statics files are not delivered (404). ... <VirtualHost *:80> ServerName mailing.ddd.fr
ErrorLog ${APACHE_LOG_DIR}/mailing.error.log CustomLog ${APACHE_LOG_DIR}/mailing.access.log combined <Location /static/> Alias "/opt/mailman/static/" </Location> <Location /> ProxyPass http://localhost:8000/ ProxyPassReverse http://localhost:8000/ ProxyPreserveHost On </Location>
</VirtualHost>/
In Apache, location <http://httpd.apache.org/docs/2.4/mod/core.html#location> is not appropriate for resources in the file system.
Try
Alias /static/ /opt/mailman/static/
not within a location block.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
-- thanks, Abhilash Raj (maxking)
Yes, of course.
Nginx and Apache works on the same server. (Nginx is stopped) I would like switch to Apache to add in front of hyperkitty a ldap connection. I need to re-compile nginx for this feature. It's directly available in apache with a module.
In fact, a tried directly to integrade LDAP with django ( https://gitlab.com/mailman/postorius/issues/132), without results.
Le ven. 19 oct. 2018 à 20:18, Abhilash Raj <maxking@asynchronous.in> a écrit :
On Fri, Oct 19, 2018, at 12:17 PM, Thomas G wrote:
Hi tried both.
Same result.
xxxx - - [19/Oct/2018:21:14:22 +0200] "GET /static/postorius/js/script.js HTTP/1.1" 404 4051 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"
And, you have verified that the files exist at
/opt/mailman/static
on your host?Le ven. 19 oct. 2018 à 18:59, Mark Sapiro <mark@msapiro.net> a écrit :
On 10/19/18 10:29 AM, Guiseppin Thomas wrote:
Hi, Currently, I use a nginx configuration for mailman. It's work
perfectly.
I tried to do the same with Apache, but the statics files are not delivered (404).
...
<VirtualHost *:80> ServerName mailing.ddd.fr
ErrorLog ${APACHE_LOG_DIR}/mailing.error.log CustomLog ${APACHE_LOG_DIR}/mailing.access.log combined <Location /static/> Alias "/opt/mailman/static/" </Location> <Location /> ProxyPass http://localhost:8000/ ProxyPassReverse http://localhost:8000/ ProxyPreserveHost On </Location>
</VirtualHost>/
In Apache, location <http://httpd.apache.org/docs/2.4/mod/core.html#location> is not appropriate for resources in the file system.
Try
Alias /static/ /opt/mailman/static/
not within a location block.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
-- thanks, Abhilash Raj (maxking)
On Fri, Oct 19, 2018, at 12:29 PM, Thomas G wrote:
Yes, of course.
Nginx and Apache works on the same server. (Nginx is stopped) I would like switch to Apache to add in front of hyperkitty a ldap connection.> I need to re-compile nginx for this feature. It's directly available in apache with a module. Not sure the reason for this, the docs mention that what you had initially and also what Mark mentioned should have worked. Both of them seem to be supported syntax from the docs[1]. The only difference that I can see is quotes, not sure if that would affect things. [1]: https://httpd.apache.org/docs/2.4/mod/mod_alias.html#alias
In fact, a tried directly to integrade LDAP with django (https://gitlab.com/mailman/postorius/issues/132), without results.>
Le ven. 19 oct. 2018 à 20:18, Abhilash Raj <maxking@asynchronous.in> a écrit :>>
On Fri, Oct 19, 2018, at 12:17 PM, Thomas G wrote:
Hi tried both.
Same result.
xxxx - - [19/Oct/2018:21:14:22 +0200] "GET /static/postorius/js/script.js>> > HTTP/1.1" 404 4051 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"
And, you have verified that the files exist at
/opt/mailman/static
on your host?>>Le ven. 19 oct. 2018 à 18:59, Mark Sapiro <mark@msapiro.net> a écrit :>> >
On 10/19/18 10:29 AM, Guiseppin Thomas wrote:
Hi, Currently, I use a nginx configuration for mailman. It's work perfectly.>> > > > I tried to do the same with Apache, but the statics files are not>> > > > delivered (404). ... <VirtualHost *:80> ServerName mailing.ddd.fr
ErrorLog ${APACHE_LOG_DIR}/mailing.error.log CustomLog ${APACHE_LOG_DIR}/mailing.access.log combined <Location /static/> Alias "/opt/mailman/static/" </Location> <Location /> ProxyPass http://localhost:8000/ ProxyPassReverse http://localhost:8000/ ProxyPreserveHost On </Location>
</VirtualHost>/
In Apache, location <http://httpd.apache.org/docs/2.4/mod/core.html#location> is not>> > > appropriate for resources in the file system.
Try
Alias /static/ /opt/mailman/static/
not within a location block.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers,>> > > San Francisco Bay Area, California better use your sense - B. Dylan>> > > _______________________________________________ Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org>> > > https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/>> > >
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/>>
-- thanks, Abhilash Raj (maxking)
-- thanks, Abhilash Raj (maxking)
On 10/19/18 12:17 PM, Thomas G wrote:
Hi tried both.
Same result.
xxxx - - [19/Oct/2018:21:14:22 +0200] "GET /static/postorius/js/script.js HTTP/1.1" 404 4051 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"
What's in the apache error log?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Same result with Alias "/static/" "/opt/mailman/static/"
I have sometimes: [Fri Oct 19 22:05:52.583841 2018] [proxy_http:error] [pid 8328:tid 140435053815552] (104)Connection reset by peer: [client 1xxxxxxx1794] AH01102: error reading status line from remote server localhost:8000 [Fri Oct 19 22:05:52.583874 2018] [proxy:error] [pid 8328:tid 140435053815552] [client 1xxxxxxx:51794] AH00898: Error reading from remote server returned by /static/hyperkitty/libs/jquery/jquery-1.10.1.min.js But it's not systematic.
Alias seem to be ignored by the proxy.
Le ven. 19 oct. 2018 à 20:48, Mark Sapiro <mark@msapiro.net> a écrit :
On 10/19/18 12:17 PM, Thomas G wrote:
Hi tried both.
Same result.
xxxx - - [19/Oct/2018:21:14:22 +0200] "GET /static/postorius/js/script.js HTTP/1.1" 404 4051 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"
What's in the apache error log?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
I found !
Based on https://stackoverflow.com/questions/26848945/exclude-an-alias-from-virtualho...
We have to exclude /static/
<VirtualHost *:80> ServerName mailing.hatlab.fr
ErrorLog ${APACHE_LOG_DIR}/mailing.error.log
CustomLog ${APACHE_LOG_DIR}/mailing.access.log combined
Alias /static/ /opt/mailman/static/
<Directory /opt/mailman/static/>
Require all granted
</Directory>
ProxyPassMatch ^/static !
ProxyPass / http://localhost:8000/
ProxyPassReverse / http://localhost:8000/
</VirtualHost>
Le ven. 19 oct. 2018 à 21:08, Thomas G <thomas82710@gmail.com> a écrit :
Same result with Alias "/static/" "/opt/mailman/static/"
I have sometimes: [Fri Oct 19 22:05:52.583841 2018] [proxy_http:error] [pid 8328:tid 140435053815552] (104)Connection reset by peer: [client 1xxxxxxx1794] AH01102: error reading status line from remote server localhost:8000 [Fri Oct 19 22:05:52.583874 2018] [proxy:error] [pid 8328:tid 140435053815552] [client 1xxxxxxx:51794] AH00898: Error reading from remote server returned by /static/hyperkitty/libs/jquery/jquery-1.10.1.min.js But it's not systematic.
Alias seem to be ignored by the proxy.
Le ven. 19 oct. 2018 à 20:48, Mark Sapiro <mark@msapiro.net> a écrit :
On 10/19/18 12:17 PM, Thomas G wrote:
Hi tried both.
Same result.
xxxx - - [19/Oct/2018:21:14:22 +0200] "GET /static/postorius/js/script.js HTTP/1.1" 404 4051 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"
What's in the apache error log?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Ok, progress with tinkering some. Using the below configuration I can manually navigate to lists.example.com/mailman3/postorius/lists/ and all is working fine. If I go to lists.example.com/mailman3 it for some reason redirects to lists.example.com/mailman/postorius/lists/ which generates a 404. Going to lists.example.com also hits a 404.
So closer, but not perfect. Any ideas?
The current, sort of working config:
<VirtualHost *:80>
ServerAdmin admin@example.com ServerName lists.example.com ServerAlias www.lists.example.com Alias /mailman3/favicon.ico /var/lib/mailman3/web/static/postorius/img/favicon.ico Alias /mailman3/static /var/lib/mailman3/web/static
<Directory "/var/lib/mailman3/web/static"> Require all granted </Directory>
<IfModule mod_proxy_uwsgi.c> ProxyPass /mailman3/favicon.ico ! ProxyPass /mailman3/static ! ProxyPass /mailman3 unix:/run/mailman3-web/uwsgi.sock|uwsgi://localhost </IfModule>
RewriteEngine on RewriteCond %{SERVER_NAME} =lists.example.com [OR] RewriteCond %{SERVER_NAME} =www.lists.example.com RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
participants (5)
-
Abhilash Raj
-
Guiseppin Thomas
-
Mail Person
-
Mark Sapiro
-
Thomas G