Modsecurity generates a lot of disk io operations, and the file www-data-ip.pag
is read and written continuously.
Is there any solution that can effectively reduce this? Could it be moved to RAM in some way?
AndreaF's questions
I'm trying to use postfix as gmail relay
smtp parameters are
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_use_tls=yes
smtp_tls_CAfile = /etc/ssl/ca-certificates.crt
smtp_tls_key_file=/etc/letsencrypt/live/MYDOMAIN.com/privkey.pem
smtp_tls_cert_file=/etc/letsencrypt/live/MYDOMAIN.com/cert.pem
smtp_tls_security_level=encrypt</id_string></id_string>
The message appears as correctly sent but actually no mail is delivered and in the mail log the issue seems caused by an error with TSL
cannot load Certification Authority data, CAfile="/etc/ssl/ca-certificates.crt": disabling TLS support
warning: TLS library problem: error:02001002:system library:fopen:No such file or directory:../crypto/bio/bss_file.c:69:fopen('/etc/ssl/ca-certificates.crt','r'):
warning: TLS library problem: error:2006D080:BIO routines:BIO_new_file:no such file:../crypto/bio/bss_file.c:76:
warning: TLS library problem: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib:../crypto/x509/by_file.c:199:
connect to smtp.gmail.com:25: Network is unreachable
The file ca-certificates.crt
exists in the path /etc/ssl/
and was already present in Debian distro
Another weird thing is that if in main.cf
I try to change the line
smtp_tls_CAfile = /etc/ssl/ca-certificates.crt
using some other certificate, the error
cannot load Certification Authority data, CAfile="/etc/ssl/ca-certificates.crt": disabling TLS support
remains the same, rather than pointing to the name of the certificate configured, despite used postfix reload
and systemctl restart postfix.service
to make sure to update the configuration
How should I fix this error?
I have the following directory structure for multiple websites and services
/var/www/html/site1
/var/www/html/site2
/var/www/html/site3
/var/www/html/serv1
/var/www/html/serv2
site1
folder hosts a website site1domain.com
I want to expose the webapp services hosted in serv1
and serv2
folders in order to show them as
service1.site1domain.com
service2.site1domain.com
So I have tried to configured the virtual host in site1domain.conf
file in this way
<VirtualHost *:80>
ServerName site1domain.com
ServerAlias www.site1domain.com
DocumentRoot /var/www/html/site1
<Directory /var/www/html/site1>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName service1.site1domain.com
ProxyPreserveHost On
ProxyRequest Off
ProxyPass "/" "localhost/serv1"
ProxyPassReverse "/" "localhost/serv1"
</VirtualHost>
<VirtualHost *:80>
ServerName service2.site1domain.com
ProxyPreserveHost On
ProxyRequest Off
ProxyPass "/" "localhost/serv2"
ProxyPassReverse "/" "localhost/serv2"
</VirtualHost>
But the virtual host code blocks related to services cause a crash of the server: exit with error code 1.
Could someone help me to understand how to configure them properly?
I have multiple websites supposed to run each with its own domain (e.g. site1.com
, differentsite2.com
, othersite3.com
etc.).
The operative directories of each website are dedicated subfolder in /var/www/html/
e.g.
/var/www/html/site1
/var/www/html/site2
/var/www/html/site3
The virtual host for each website is something like
<VirtualHost *:80>
ServerName site1.com
ServerAlias www.site1.com
DocumentRoot /var/www/html/site1
<Directory /var/www/html/site1>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
with a dedicated config file in /etc/apache2/sites-available/
enabled with a2ensite
command
and the default config disabled with a2dissite 000-default.conf
others website are configured in a similar way with
<VirtualHost *:80>
ServerName site2.com
ServerAlias www.site2.com
DocumentRoot /var/www/html/site2
</VirtualHost>
etc.
Problem:
When I open www.site1.com
rather than showing index in its DocumentRoot
at /var/www/html/site1/index
as supposed,
It shows the index in main root at /var/www/html/index
Could someone help he to understand the issue?
I have a website www.somewebsite.com
domain hosted on lighttpd 1.4 server configured with server.port = 8080
that is on a device (A) with local IP 192.168.1.26
and I want to get to use a reverse proxy in order to access another server that runs on a different device (B) at 192.168.1.30:80/myapp
in order to be accessed as
somewebsite.com/myapp
In device (A) server config I have enabled mod_proxy
and I have tried to add
$HTTP["url"] =~ "^.*myapp" {
proxy.server = ( "" =>
(( "(www.)?somewebsite.com" => "192.168.1.30", "port" => 80 ))
)
}
but I get internal server error page when I try to access somewebsite.com/myapp
I have tried also
$HTTP["url"] =~ "(^/myapp/)" {
proxy.server = ( "" => ("" => ( "(www.)?somewebsite.com" => "127.0.0.1", "port" => 8080 )))
}
$SERVER["socket"] == ":81" {
url.rewrite-once = ( "^/myapp/(.*)$" => "/$1" )
proxy.server = ( "" => ( "" => ( "(www.)?somewebsite.com" => "192.168.1.30", "port" => 80 )))
}
but the result is even worse and server crashes completely
I have a website with an hosted domain https://www.somesamplesite.com
in a PC (A) with local network IP 192.168.1.10
and a service running on a different server hosted in a different PC (B) running at the address 192.168.1.25/myserver2
with no public domain.
Now I want that the service on (B) works as subdirectory of the website hosted in (A) so that if access
https://www.somesamplesite.com/mysubdirectory
it works using the public domain of (A) at mysubdirectory
What is the configuration should I use to do this correctly?