If you get any response like below its installedgrep 'mod_ruid2' /etc/httpd/conf/httpd.conf
LoadModule ruid2_module /usr/lib/apache/mod_ruid2.so
If you get any response like below its installedgrep 'mod_ruid2' /etc/httpd/conf/httpd.conf
LoadModule ruid2_module /usr/lib/apache/mod_ruid2.so
How would I verify if mod_ruid2 is installed or not. And what is advantage of using it. As per my understanding it does not allow php scripts to modify the folder outside of its containing folder?
/usr/local/directadmin/directadmin c | grep -i ruid
httpd -M | grep -i ruid
[root@host ~]# httpd -M | grep -i ruid
AH00112: Warning: DocumentRoot [/home/res1/domains/sharedip] does not exist
AH00112: Warning: DocumentRoot [/home/res1/domains/sharedip] does not exist
AH00112: Warning: DocumentRoot [/home/admin/subdomains/custom/custom] does not exist
AH00112: Warning: DocumentRoot [/home/admin/subdomains/custom/custom] does not exist
AH00112: Warning: DocumentRoot [/home/res1/customdocroot/] does not exist
AH00112: Warning: DocumentRoot [/home/res1/customdocroot/] does not exist
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using host.n3rd.ga. Set the 'ServerName' directive globally to suppress this message
[root@host ~]#
[root@host ~]# mkdir -p /home/res1/domains/sharedip
[root@host ~]# nano /home/res1/domains/sharedip/index.html
[root@host ~]# cat /home/res1/domains/sharedip/index.html
<h1>docroot for shared ip</h1>
[root@host ~]#
[root@host ~]# grep -i docroot /usr/local/directadmin/data/users/*/httpd.conf
/usr/local/directadmin/data/users/res1/httpd.conf: DocumentRoot /home/res1/customdocroot/
/usr/local/directadmin/data/users/res1/httpd.conf: ScriptAlias /cgi-bin/ /home/res1/customdocroot//cgi-bin/
/usr/local/directadmin/data/users/res1/httpd.conf: <Directory /home/res1/customdocroot/>
/usr/local/directadmin/data/users/res1/httpd.conf: DocumentRoot /home/res1/customdocroot/
/usr/local/directadmin/data/users/res1/httpd.conf: <Directory /home/res1/customdocroot/>
[root@host ~]#
[root@host ~]# ll /home/res1/customdocroot/
ls: cannot access /home/res1/customdocroot/: No such file or directory
[root@host ~]#
[Tue, 01 Dec 2020 22:31:16 GMT] [Error] [463] Failed to make directory /var/cache/mod_pagespeed/shm_metadata_cache: Permission denied
[Tue, 01 Dec 2020 22:31:16 GMT] [Error] [463] Could not create directories for file /var/cache/mod_pagespeed/shm_metadata_cache/snapshot/pagespeed_default_shm/metadata_cache/1/64/4452/128/42,.temp
[Tue, 01 Dec 2020 22:31:16 GMT] [Error] [463] [/var/cache/mod_pagespeed/shm_metadata_cache/snapshot/pagespeed_default_shm/metadata_cache/1/64/4452/128/42,.temptWzVBr:0] opening temp file: No such file or directory
[Tue, 01 Dec 2020 22:31:16 GMT] [Error] [463] [/var/log/pagespeed/stats_log_global:0] opening output file: Permission denied
[Tue, 01 Dec 2020 22:31:16 GMT] [Error] [463] Error opening statistics log file /var/log/pagespeed/stats_log_global.
[Tue, 01 Dec 2020 22:31:17 GMT] [Error] [463] [/var/cache/mod_pagespeed/cache.purge.tempycVpRq:0] opening temp file: Permission denied
[Tue, 01 Dec 2020 22:31:17 GMT] [Error] [463] [/var/cache/mod_pagespeed/cache.purge.temp3KWU6p:0] opening temp file: Permission denied
[Tue, 01 Dec 2020 22:31:17 GMT] [Error] [463] [/var/cache/mod_pagespeed/cache.purge.tempQRhqmp:0] opening temp file: Permission denied
If you have mod_ruid2 enabled, I'd suggest disabling it.Hello i am also getting Permission denied Could not create directories error. I have checked mod ruid not installed. Any idea how to fix this, permission for cache folder
drwxr-xr-x. 7 root root 76 Nov 27 14:51 cache
drwxr-xr-x 2 root root 6 Nov 27 14:51 cache/mod_pagespeed/
Code:[Tue, 01 Dec 2020 22:31:16 GMT] [Error] [463] Failed to make directory /var/cache/mod_pagespeed/shm_metadata_cache: Permission denied [Tue, 01 Dec 2020 22:31:16 GMT] [Error] [463] Could not create directories for file /var/cache/mod_pagespeed/shm_metadata_cache/snapshot/pagespeed_default_shm/metadata_cache/1/64/4452/128/42,.temp [Tue, 01 Dec 2020 22:31:16 GMT] [Error] [463] [/var/cache/mod_pagespeed/shm_metadata_cache/snapshot/pagespeed_default_shm/metadata_cache/1/64/4452/128/42,.temptWzVBr:0] opening temp file: No such file or directory [Tue, 01 Dec 2020 22:31:16 GMT] [Error] [463] [/var/log/pagespeed/stats_log_global:0] opening output file: Permission denied [Tue, 01 Dec 2020 22:31:16 GMT] [Error] [463] Error opening statistics log file /var/log/pagespeed/stats_log_global. [Tue, 01 Dec 2020 22:31:17 GMT] [Error] [463] [/var/cache/mod_pagespeed/cache.purge.tempycVpRq:0] opening temp file: Permission denied [Tue, 01 Dec 2020 22:31:17 GMT] [Error] [463] [/var/cache/mod_pagespeed/cache.purge.temp3KWU6p:0] opening temp file: Permission denied [Tue, 01 Dec 2020 22:31:17 GMT] [Error] [463] [/var/cache/mod_pagespeed/cache.purge.tempQRhqmp:0] opening temp file: Permission denied
Thanks
Not using mod ruid2,If you have mod_ruid2 enabled, I'd suggest disabling it.
core_module (static)
authn_file_module (static)
authn_dbm_module (static)
authn_anon_module (static)
authn_dbd_module (static)
authn_socache_module (static)
authn_core_module (static)
authz_host_module (static)
authz_groupfile_module (static)
authz_user_module (static)
authz_dbm_module (static)
authz_owner_module (static)
authz_dbd_module (static)
authz_core_module (static)
access_compat_module (static)
auth_basic_module (static)
auth_form_module (static)
auth_digest_module (static)
allowmethods_module (static)
file_cache_module (static)
cache_module (static)
cache_disk_module (static)
cache_socache_module (static)
socache_shmcb_module (static)
socache_dbm_module (static)
socache_memcache_module (static)
socache_redis_module (static)
so_module (static)
watchdog_module (static)
macro_module (static)
dbd_module (static)
dumpio_module (static)
buffer_module (static)
ratelimit_module (static)
reqtimeout_module (static)
ext_filter_module (static)
request_module (static)
include_module (static)
filter_module (static)
substitute_module (static)
sed_module (static)
deflate_module (static)
http_module (static)
mime_module (static)
log_config_module (static)
log_debug_module (static)
logio_module (static)
env_module (static)
expires_module (static)
headers_module (static)
unique_id_module (static)
setenvif_module (static)
version_module (static)
remoteip_module (static)
proxy_module (static)
proxy_connect_module (static)
proxy_ftp_module (static)
proxy_http_module (static)
proxy_fcgi_module (static)
proxy_scgi_module (static)
proxy_uwsgi_module (static)
proxy_fdpass_module (static)
proxy_wstunnel_module (static)
proxy_ajp_module (static)
proxy_balancer_module (static)
proxy_express_module (static)
proxy_hcheck_module (static)
session_module (static)
session_cookie_module (static)
session_dbd_module (static)
slotmem_shm_module (static)
ssl_module (static)
http2_module (static)
lbmethod_byrequests_module (static)
lbmethod_bytraffic_module (static)
lbmethod_bybusyness_module (static)
lbmethod_heartbeat_module (static)
unixd_module (static)
systemd_module (static)
dav_module (static)
status_module (static)
autoindex_module (static)
info_module (static)
suexec_module (static)
cgi_module (static)
dav_fs_module (static)
dav_lock_module (static)
vhost_alias_module (static)
negotiation_module (static)
dir_module (static)
actions_module (static)
speling_module (static)
userdir_module (static)
alias_module (static)
rewrite_module (static)
security2_module (shared)
mpm_event_module (shared)
pagespeed_module (shared)
Due to some requests that people find it difficult to install mod_pagespeed, I'm just writing a guide for now As DirectAdmin does not use RPM for Apache, and mod_pagespeed provides 'source installation' packages only for nginx, it creates difficulties for some end-customers. However, it's not as hard to install it.
Guide for CentOS.
We download RPM and extract it:
Code:mkdir -p /root/mod_pagespeed cd /root/mod_pagespeed wget -O mod-pagespeed-stable_current_x86_64.rpm https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm rpm2cpio mod-pagespeed-stable_current_x86_64.rpm| cpio -idmv
Now we just move files to appropriate places:
Code:mv -f ./etc/httpd/conf.d/pagespeed.conf /etc/httpd/conf/extra/pagespeed.conf mv -f ./etc/httpd/conf.d/pagespeed_libraries.conf /etc/httpd/conf/extra/pagespeed_libraries.conf mv -f ./usr/bin/pagespeed_js_minify /usr/bin/pagespeed_js_minify mv -f ./usr/lib64/httpd/modules/mod_pagespeed_ap24.so /usr/lib/apache/mod_pagespeed_ap24.so mkdir -p /var/cache/mod_pagespeed mkdir -p /var/log/pagespeed
Replace '/usr/lib64/httpd/modules/' path to '/usr/lib/apache/' in /etc/httpd/conf/extra/pagespeed.conf:
Code:perl -pi -e 's|/usr/lib64/httpd/modules/|/usr/lib/apache/|g' /etc/httpd/conf/extra/pagespeed.conf
And include pagespeed.conf and pagespeed_libraries.conf to be loaded, just edit /etc/httpd/conf/extra/httpd-includes.conf, and add these lines:
Code:Include /etc/httpd/conf/extra/pagespeed.conf Include /etc/httpd/conf/extra/pagespeed_libraries.conf
Restart apache now:
Code:service httpd restart
I'd suggest having pagespeed on nginx side, even if it'd work on Apache too What's the main reason you'd like to use pagespeed for? As HTTP/2 sends all the content in a single connection, thus "combined" css, js, image sprites don't add any benefits anymore.Hi, Is this the same procedure for Nginx + Apache ?
I have To Slow Website, One website in entire VPS.I'd suggest having pagespeed on nginx side, even if it'd work on Apache too What's the main reason you'd like to use pagespeed for? As HTTP/2 sends all the content in a single connection, thus "combined" css, js, image sprites don't add any benefits anymore.