I have problem with Gzip compression on Apache server (FreeBSD). In my httpd.conf file I have:
ServerRoot "/home/xxxx-strona"
Listen 10.0.1.240:55734
PidFile /home/xxxx-strona/NOBACKUP/pid
Mutex default:/home/xxxx-strona/NOBACKUP
StartServers 1
MinSpareServers 1
MaxSpareServers 1
LoadModule mpm_prefork_module /usr/local/libexec/apache24/mod_mpm_prefork.so
LoadModule authn_core_module /usr/local/libexec/apache24/mod_authn_core.so
LoadModule authz_core_module /usr/local/libexec/apache24/mod_authz_core.so
LoadModule unixd_module /usr/local/libexec/apache24/mod_unixd.so
LoadModule reqtimeout_module /usr/local/libexec/apache24/mod_reqtimeout.so
LoadModule log_config_module /usr/local/libexec/apache24/mod_log_config.so
LoadModule setenvif_module /usr/local/libexec/apache24/mod_setenvif.so
LoadModule dir_module /usr/local/libexec/apache24/mod_dir.so
LoadModule mime_module /usr/local/libexec/apache24/mod_mime.so
LoadModule alias_module /usr/local/libexec/apache24/mod_alias.so
LoadModule rewrite_module /usr/local/libexec/apache24/mod_rewrite.so
LoadModule expires_module /usr/local/libexec/apache24/mod_expires.so
LoadModule headers_module /usr/local/libexec/apache24/mod_headers.so
LoadModule filter_module /usr/local/libexec/apache24/mod_filter.so
LoadModule deflate_module /usr/local/libexec/apache24/mod_deflate.so
LoadModule php7_module /usr/local/libexec/apache24/libphp7.so
LoadModule php7_module /usr/local/libexec/apache24/mod_http2.so
ServerAdmin xxxx
ServerName www.xxxx.pl
DocumentRoot "strona"
<IfModule dir_module>
DirectoryIndex index.html index.php index.php3 index.cgi
</IfModule>
<Directory />
AllowOverride All
</Directory>
<FilesMatch "^\.ht">
Require all denied
</FilesMatch>
#ErrorLog "NOBACKUP/httpd-error.log"
ErrorLog "/dev/null"
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
# CustomLog "apache/httpd-access.log" combined
CustomLog "/dev/null" combined
</IfModule>
<IfModule mime_module>
TypesConfig /usr/local/etc/apache24/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddHandler cgi-script .cgi .pl
AddType application/x-httpd-php .php .php4 .php3
AddType application/x-httpd-php-source .phps
</IfModule>
EnableSendfile off
<IfModule mod_deflate.c>
<IfModule mod_filter.c>
# these are known to be safe with MSIE 6
AddOutputFilterByType DEFLATE text/html text/plain text/xml
# everything else may cause problems with MSIE 6
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE image/svg+xml
</IfModule>
</IfModule>
<Directory /home/xxxx/xxxx-strona2/strona/>
php_admin_value upload_tmp_dir /home/xxxx-strona/NOBACKUP
</Directory>
but I still getting error:
We successfully added Gzip compression settings into .htaccess file.
However, the test file we fetched was not Gzip-compressed. It seems
one of Apache modules - mod_filter or mod_deflate - is not active.
(WP Optimize plugin)
GTmetrix also says that Gzip is not enabled.
Where is mistake?
The problem was server version.
Related
% whoami
tim.daley
% % apachectl -V
Server version: Apache/2.4.41 (Unix)
Server built: Oct 1 2019 10:31:38
Server's Module Magic Number: 20120211:88
Server loaded: APR 1.7.0, APR-UTIL 1.6.1
Compiled using: APR 1.7.0, APR-UTIL 1.6.1
Architecture: 64-bit
Server MPM: prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/usr/local/Cellar/httpd/2.4.41_1"
-D SUEXEC_BIN="/usr/local/opt/httpd/bin/suexec"
-D DEFAULT_PIDLOG="/usr/local/var/run/httpd/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/usr/local/etc/httpd/mime.types"
-D SERVER_CONFIG_FILE="/usr/local/etc/httpd/httpd.conf"
% uname -a
Darwin Tims-MacBook-Pro-2.local 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan 9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64
/private/etc/apache2/httpd.conf: (with comments and blank lines removed)
ServerRoot "/usr"
<IfDefine SERVER_APP_HAS_DEFAULT_PORTS>
Listen 8080
</IfDefine>
<IfDefine !SERVER_APP_HAS_DEFAULT_PORTS>
Listen 80
</IfDefine>
LoadModule mpm_prefork_module libexec/apache2/mod_mpm_prefork.so
LoadModule authn_file_module libexec/apache2/mod_authn_file.so
LoadModule authn_core_module libexec/apache2/mod_authn_core.so
LoadModule authz_host_module libexec/apache2/mod_authz_host.so
LoadModule authz_groupfile_module libexec/apache2/mod_authz_groupfile.so
LoadModule authz_user_module libexec/apache2/mod_authz_user.so
LoadModule authz_core_module libexec/apache2/mod_authz_core.so
LoadModule access_compat_module libexec/apache2/mod_access_compat.so
LoadModule auth_basic_module libexec/apache2/mod_auth_basic.so
LoadModule reqtimeout_module libexec/apache2/mod_reqtimeout.so
LoadModule include_module libexec/apache2/mod_include.so
LoadModule filter_module libexec/apache2/mod_filter.so
LoadModule mime_module libexec/apache2/mod_mime.so
LoadModule log_config_module libexec/apache2/mod_log_config.so
LoadModule env_module libexec/apache2/mod_env.so
LoadModule headers_module libexec/apache2/mod_headers.so
LoadModule setenvif_module libexec/apache2/mod_setenvif.so
LoadModule version_module libexec/apache2/mod_version.so
LoadModule slotmem_shm_module libexec/apache2/mod_slotmem_shm.so
LoadModule unixd_module libexec/apache2/mod_unixd.so
LoadModule status_module libexec/apache2/mod_status.so
LoadModule autoindex_module libexec/apache2/mod_autoindex.so
<IfModule !mpm_prefork_module>
#LoadModule cgid_module libexec/apache2/mod_cgid.so
</IfModule>
<IfModule mpm_prefork_module>
LoadModule cgi_module libexec/apache2/mod_cgi.so
</IfModule>
LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so
LoadModule negotiation_module libexec/apache2/mod_negotiation.so
LoadModule dir_module libexec/apache2/mod_dir.so
LoadModule userdir_module libexec/apache2/mod_userdir.so
LoadModule alias_module libexec/apache2/mod_alias.so
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
LoadModule php7_module libexec/apache2/libphp7.so
LoadModule hfs_apple_module libexec/apache2/mod_hfs_apple.so
<IfModule unixd_module>
User _www
Group _www
</IfModule>
ServerAdmin you#example.com
ServerName Tims-MacBook-Pro-2.local:80
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "/Library/WebServer/Documents"
<Directory "/Library/WebServer/Documents">
Options FollowSymLinks Multiviews Indexes
MultiviewsMatch Any
AllowOverride None
Require all granted
</Directory>
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
<FilesMatch "^\.([Hh][Tt]|[Dd][Ss]_[Ss])">
Require all denied
</FilesMatch>
<Files "rsrc">
Require all denied
</Files>
<DirectoryMatch ".*\.\.namedfork">
Require all denied
</DirectoryMatch>
ErrorLog "/private/var/log/apache2/error_log"
LogLevel trace8
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "/private/var/log/apache2/access_log" common
</IfModule>
<IfModule alias_module>
ScriptAliasMatch ^/cgi-bin/((?!(?i:webobjects)).*$) "/Library/WebServer/CGI-Executables/$1"
</IfModule>
<IfModule cgid_module>
</IfModule>
<Directory "/Library/WebServer/CGI-Executables">
AllowOverride None
Options None
Require all granted
</Directory>
<IfModule headers_module>
RequestHeader unset Proxy early
</IfModule>
<IfModule mime_module>
TypesConfig /private/etc/apache2/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>
TraceEnable off
Include /private/etc/apache2/extra/httpd-mpm.conf
Include /private/etc/apache2/extra/httpd-autoindex.conf
Include /private/etc/apache2/extra/httpd-userdir.conf
Include /private/etc/apache2/extra/httpd-vhosts.conf
<IfModule proxy_html_module>
Include /private/etc/apache2/extra/proxy-html.conf
</IfModule>
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
Include /private/etc/apache2/other/*.conf
/etc/apache2/users/tim.daley.conf:
<Directory "/Users/tim.daley/Sites/">
AddLanguage en .en
DirectoryIndex index.html index.php index index.html default.html default.htm
AllowOverride All
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS>
Require all granted
</Limit>
<LimitExcept GET POST OPTIONS>
Require all denied
</LimitExcept>
AddHandler cgi-script .cgi
AddHandler perl-script .pl
PerlHandler ModPerl::Registry
</Directory>
/private/etc/apache2/extra/httpd-userdir.conf:
UserDir Sites
Include /private/etc/apache2/users/*.conf
<IfModule bonjour_module>
RegisterUserSite customized-users
</IfModule>
/private/etc/apache2/extra/httpd-vhosts.conf:
<VirtualHost *:80>
ServerAdmin webmaster#dummy-host.example.com
DocumentRoot "/usr/docs/dummy-host.example.com"
ServerName dummy-host.example.com
ServerAlias www.dummy-host.example.com
ErrorLog "/private/var/log/apache2/dummy-host.example.com-error_log"
CustomLog "/private/var/log/apache2/dummy-host.example.com-access_log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster#dummy-host2.example.com
DocumentRoot "/usr/docs/dummy-host2.example.com"
ServerName dummy-host2.example.com
ErrorLog "/private/var/log/apache2/dummy-host2.example.com-error_log"
CustomLog "/private/var/log/apache2/dummy-host2.example.com-access_log" common
</VirtualHost>
% ls -al Sites
total 32
drwxrwxrwx 7 tim.daley staff 224 Mar 5 12:07 .
drwxr-xr-x+ 202 tim.daley staff 6464 Mar 6 11:31 ..
-rwxr-xr-x 1 tim.daley staff 174 Mar 5 12:07 index.html
http://http://localhost/~tim.daley:
Not Found
The requested URL was not found on this server.
I've checked all kinds of articles such as https://tech-cookbook.com/2019/10/07/setting-up-your-local-server-on-macos-catalina-2019-mamp/, https://coolestguidesontheplanet.com/install-apache-mysql-php-on-macos-catalina-10-15, https://apple.stackexchange.com/questions/300081/apache-not-working-with-user-sites-folder-on-macos-10-13-high-sierra.
Can anyone suggest what I can do to get this working?
I wanted to set up two virtual hosts for my apache2 running on my computer. I have inserted www.vh1.com and www.vh2.com in my hosts file in C:\Windows\System32\Drivers\etc\host. I have also created the two folders, C:\test1 and C:\test2, with the html files I want www.vh1.com and www.vh2.com to display.
However, when I opened www.vh1.com and www.vh2.com on my browser, I got re-directed to my localhost home page for www.vh2.com, and www.vh1.com showed me that web page on the Internet. Would anyone be able to help resolve this error? Would greatly appreciate it. Below is my apache httpd.conf file, minus comments:
ServerRoot "C:/Program Files (x86)/Apache Software Foundation/Apache2.2"
Listen 80
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule setenvif_module modules/mod_setenvif.so
<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
User daemon
Group daemon
</IfModule>
</IfModule>
ServerAdmin tomlin190#hotmail.com
DocumentRoot "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs"
<Directory />
Options FollowSymLinks ExecCGI
AddHandler cgi-script .cgi .py
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs">
Options Indexes FollowSymLinks ExecCGI
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
ErrorLog "logs/error.log"
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "logs/access.log" common
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/cgi-bin/"
</IfModule>
<IfModule cgid_module>
</IfModule>
<Directory "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
DefaultType text/plain
<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddHandler cgi-script .cgi .py
</IfModule>
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "c:/test1"
ServerName www.vh1.com
<Directory "c:/test1">
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/test2"
ServerName www.vh2.com
<Directory "c:/test2">
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/php"
in case www.vh1.com get's you online I suspect it must be some mistake in your host file. It should resolve to localhost.
Please check this link http://foundationphp.com/tutorials/apache_vhosts.php
I have no way of testing you conf file since I only host on Linux.
Honestly i have no idea if double quote are required. I would cut them, move Directory outside VirtualHost rules.
I installed a portable XAMPP webserver at usb stick and have found that is not portable at all. I also deployed a huge site in it. So I decided to change apache and myslq configs to get some experience and save the time from reinstalling the webserver and a huge site again.
I changed pathes to relative ones in configuration files of apache and now it can't be launched and windows tells that it will close this application. Please help me to know what is going on
Here is httpd.conf:
ServerRoot "apache"
Listen 80
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule allowmethods_module modules/mod_allowmethods.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dav_lock_module modules/mod_dav_lock.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule headers_module modules/mod_headers.so
LoadModule include_module modules/mod_include.so
LoadModule info_module modules/mod_info.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule cache_disk_module modules/mod_cache_disk.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule status_module modules/mod_status.so
<IfModule unixd_module>
User daemon
Group daemon
</IfModule>
ServerAdmin postmaster#localhost
ServerName localhost:80
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "../htdocs"
<Directory "../htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
<IfModule dir_module>
DirectoryIndex index.php index.pl index.cgi index.asp index.shtml index.html index.htm \
default.php default.pl default.cgi default.asp default.shtml default.html default.htm \
home.php home.pl home.cgi home.asp home.shtml home.html home.htm
</IfModule>
<Files ".ht*">
Require all denied
</Files>
ErrorLog "logs/error.log"
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "logs/access.log" combined
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/cgi-bin/"
</IfModule>
<IfModule cgid_module>
</IfModule>
<Directory "/cgi-bin">
AllowOverride All
Options None
Require all granted
</Directory>
<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddHandler cgi-script .cgi .pl .asp
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</IfModule>
<IfModule mime_magic_module>
MIMEMagicFile "conf/magic"
</IfModule>
Include conf/extra/httpd-mpm.conf
Include conf/extra/httpd-multilang-errordoc.conf
Include conf/extra/httpd-autoindex.conf
Include conf/extra/httpd-languages.conf
Include conf/extra/httpd-userdir.conf
Include conf/extra/httpd-info.conf
Include conf/extra/httpd-vhosts.conf
Include "conf/extra/httpd-proxy.conf"
Include "conf/extra/httpd-default.conf"
Include "conf/extra/httpd-xampp.conf"
<IfModule proxy_html_module>
Include conf/extra/proxy-html.conf
</IfModule>
Include conf/extra/httpd-ssl.conf
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
AcceptFilter http none
<IfModule mod_proxy.c>
<IfModule mod_proxy_ajp.c>
Include "conf/extra/httpd-ajp.conf"
</IfModule>
</IfModule>
and here is httpd-xampp.conf:
CODE: SELECT ALL
<IfModule env_module>
SetEnv MIBDIRS "../../../php/extras/mibs"
SetEnv MYSQL_HOME "\\xampp\\mysql\\bin"
SetEnv OPENSSL_CONF "F:/xamp_port/apache/bin/openssl.cnf"
SetEnv PHP_PEAR_SYSCONF_DIR "\\xampp\\php"
SetEnv PHPRC "\\xampp\\php"
SetEnv TMP "\\xampp\\tmp"
</IfModule>
LoadFile "../php/php5ts.dll"
LoadFile "../php/libpq.dll"
LoadModule php5_module "../php/php5apache2_4.dll"
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
<IfModule php5_module>
PHPINIDir "../php"
</IfModule>
<IfModule mime_module>
AddType text/html .php .phps
</IfModule>
ScriptAlias /php-cgi/ "../php/"
<Directory "../php">
AllowOverride None
Options None
Require all denied
<Files "php-cgi.exe">
Require all granted
</Files>
</Directory>
<Directory "../cgi-bin">
<FilesMatch "\.php$">
SetHandler cgi-script
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler None
</FilesMatch>
</Directory>
<Directory "../htdocs/xampp">
<IfModule php5_module>
<Files "status.php">
php_admin_flag safe_mode off
</Files>
</IfModule>
AllowOverride AuthConfig
</Directory>
<IfModule alias_module>
Alias /security "../security/htdocs/"
<Directory "../security/htdocs">
<IfModule php5_module>
<Files "xamppsecurity.php">
php_admin_flag safe_mode off
</Files>
</IfModule>
AllowOverride AuthConfig
Require all granted
</Directory>
Alias /licenses "../licenses/"
<Directory "../licenses">
Options +Indexes
<IfModule autoindex_color_module>
DirectoryIndexTextColor "#000000"
DirectoryIndexBGColor "#f8e8a0"
DirectoryIndexLinkColor "#bb3902"
DirectoryIndexVLinkColor "#bb3902"
DirectoryIndexALinkColor "#bb3902"
</IfModule>
Require all granted
</Directory>
Alias /phpmyadmin "../phpMyAdmin/"
<Directory "..">
AllowOverride AuthConfig
Require all granted
</Directory>
Alias /webalizer "../webalizer/"
<Directory "../webalizer">
<IfModule php5_module>
<Files "webalizer.php">
php_admin_flag safe_mode off
</Files>
</IfModule>
AllowOverride AuthConfig
Require all granted
</Directory>
</IfModule>
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
The decision is to download and unzip zip distributive of portable version and then copy all configuration files from it. And by the way - the xampp must be placed in the root of the disk
So the page is loading slow... Wants do download 4.4MB of page according to pingdom. I tried using disk cache, but spiceworks wont start up when adding the configurations to httpd.conf
httpd.conf:
ServerRoot "C:/Program Files/Spiceworks/httpd"
ServerTokens Min
Listen 9002
TraceEnable off
UseCanonicalPhysicalPort On
AllowEncodedSlashes On
EnableSendfile Off
EnableMMAP Off
ThreadsPerChild 150
Win32DisableAcceptEx
PidFile "log/httpd.pid"
LoadModule log_config_module modules/mod_log_config.so
LoadModule log_rotate_module modules/mod_log_rotate.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule alias_module modules/mod_alias.so
LoadModule cache_module modules/mod_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule expires_module modules/mod_expires.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule headers_module modules/mod_headers.so
LoadModule disk_cache_module modules/mod_disk_cache.so
# uncomment the following to enable compression from server to client
# depending on your network, this may increase performance
#LoadModule deflate_module modules/mod_deflate.so
# for debugging
#LoadModule dumpio_module modules/mod_dumpio.so
# Restrictive default access configuration
<Directory />
AllowOverride None
Order deny,allow
Deny from all
</Directory>
# No directory overrides are allowed in the rest of this config, but should
# someone customize it, don't allow download of the config files
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
# server logging
# values: debug, info, notice, warn, error, crit, alert, emerg.
LogLevel warn
ErrorLog "log/error.log"
<IfModule dumpio_module>
# Full request logging
# Also change LogLevel above
DumpIOInput On
DumpIOLogLevel debug
</IfModule>
<IfModule log_config_module>
# CustomLog formats
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
# Use combined logging by default
CustomLog "log/access.log" combined
</IfModule>
<IfModule log_rotate_module>
RotateLogs On
RotateLogsLocalTime On
RotateInterval 86400
</IfModule>
# for debugging rewrites
#RewriteLog "log/rewrite.log"
#RewriteLogLevel 5
# If not specified or undetermined by mime_module
DefaultType text/plain
<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>
<IfModule deflate_module>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript application/x-javascript text/css
</IfModule>
<IfModule mem_cache_module>
CacheEnable mem /
CacheIgnoreHeaders Set-Cookie
MCacheSize 50000
MCacheMaxObjectCount 1009
MCacheMinObjectSize 1
</IfModule>
# client-side caching for assets
<IfModule expires_module>
ExpiresActive On
# 10 minutes by default
<FilesMatch "(i?)\.(ico|gif|jpe?g|png|html|css(\.gz)?|js(\.gz)?)$">
ExpiresDefault "access plus 10 minutes"
</FilesMatch>
# 1 year for assets with cache-buster ("labeled" using location prefix in rewrite rules below)
<Location "/.asset/">
ExpiresDefault "access plus 1 year"
</Location>
</IfModule>
# error documents
ErrorDocument 404 /404.html
ErrorDocument 500 /500.html
ErrorDocument 503 /503.html
ErrorDocument 502 /500.html
ErrorDocument 504 /503.html
ProxyErrorOverride Off
<IfModule proxy_scgi_module>
Include conf/scgi_proxy.conf
</IfModule>
Alias /.asset "C:/Program Files/Spiceworks/pkg/gems/spiceworks_public-7.5.00065"
<Proxy http://static.spiceworks.com >
ProxySet retry=0 max=4 smax=1 ttl=15 connectiontimeout=10 acquire=30000 timeout=30
</Proxy>
<Proxy http://community.spiceworks.com >
ProxySet retry=0 max=4 smax=1 ttl=15 connectiontimeout=10 acquire=30000 timeout=30
</Proxy>
DocumentRoot "C:/Program Files/Spiceworks/pkg/gems/spiceworks_public-7.5.00065"
<Directory "C:/Program Files/Spiceworks/pkg/gems/spiceworks_public-7.5.00065">
Options FollowSymLinks ExecCGI
AllowOverride None
Order allow,deny
Allow from all
RewriteEngine On
<IfModule expires_module>
# find assets with cache-buster (e.g. "filename?123456")
# label with location ".asset" and pass through (PT) block above to blow out the client-side expires time
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_URI} \.(ico|gif|jpe?g|png|html|css|js)$ [NC]
RewriteCond %{QUERY_STRING} ^[0-9]+$
RewriteRule . .asset%{REQUEST_URI}?asset [QSA,NS,PT]
</IfModule>
# proxy to community server to pull in community content
RewriteRule ^content_points/cdn/(.*) http://static.spiceworks.com/$1 [QSA,NS,L,P]
RewriteRule ^content_points/pass/(.*) http://community.spiceworks.com/$1?app_render=true&product_version=7.5.00065 [QSA,NS,L,P]
RewriteRule ^content_points/([^/]+) http://community.spiceworks.com/app/deliveries/$1?product_version=7.5.00065 [QSA,NS,L,P]
# tray opens up to /splash or /first_splash
# this is just a static file
RewriteRule ^(first_splash|splash)$ splash.html [NS,L]
# redirect non files to rails
# RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
<IfModule proxy_scgi_module>
RewriteRule .? .scgi%{REQUEST_URI} [E=X_HTTP_AUTHORIZATION:%{HTTP:Authorization},QSA,NS,L]
</IfModule>
<IfModule headers_module>
Header set X-UA-Compatible "IE=Edge,chrome=1"
</IfModule>
</Directory>
# this section is included only when you run httpdconf with the files
# ssl-cert.pem and ssl-private-key.pem in the ssl subdirectory
<IfModule ssl_module>
Listen 9003
SSLCompression off
And what im trying to add:
<IfModule cache_module>
LoadModule cache_disk_module modules/mod_cache_disk.so
<IfModule cache_disk_module>
CacheDefaultExpire 3600
CacheEnable disk /
CacheRoot "/cache/"
CacheDirLevels 2
CacheDirLength 1
</IfModule>
</IfModule>
What am I doing wrong?
How long is the loading time?
And any more information?
Like, where does it load very long?
How big is the TTFB(http://www.bytecheck.com/) etc..
I am trying to transfer a website that is on a local dev server to a live server.
The top domain works fine, but when I try to access the subdomain I get a 403 forbidden error.
Here is the message in the error log:
[Sun Sep 16 13:54:38 2012] [error] [client 108.176.142.194]
(13)Permission denied: Can't open directory for index:
/home/www/htdocs/weatherbell.com/models/html/neytiri/,
referer: http://models.weather-bell.com/html/
The directory neytiri in /home/www/htdocs/weatherbell.com/models/html/ is a symlink to /neytiri (on the drive's root).
I have set the permissions to 755 for everything I could find, and set the owner and group to root, but it still doesn't work.
Here is my httpd.conf:
ServerRoot "/etc/httpd/"
Listen 80
ServerName weatherbell.com
ServerAdmin root#weatherbell.com
DocumentRoot "/home/www/htdocs/weatherbell.com"
NameVirtualHost *:80
DirectoryIndex index.html index.html.var index.php
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
<IfModule prefork.c>
StartServers 4
MinSpareServers 5
MaxSpareServers 10
ServerLimit 69
MaxClients 69
MaxRequestsPerChild 1000
LoadModule php5_module modules/libphp5.so
</IfModule>
<IfModule worker.c>
StartServers 4
MaxClients 1024
MinSpareThreads 64
MaxSpareThreads 192
ThreadsPerChild 64
MaxRequestsPerChild 0
LoadModule php5_module modules/libphp5-zts.so
</IfModule>
<IfModule mod_status.c>
ExtendedStatus On
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from all
</Location>
</IfModule>
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so
UseCanonicalName Off
<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
User daemon
Group daemon
</IfModule>
</IfModule>
<IfModule mod_userdir.c>
UserDir "disable"
</IfModule>
AccessFileName ".htaccess"
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
<IfModule mod_mime_magic.c>
MIMEMagicFile "conf/magic"
</IfModule>
HostnameLookups Off
ErrorLog "logs/error.log"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "/home/www/htdocs/weatherbell.com">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
ErrorLog "logs/error.log"
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "logs/access.log" common
</IfModule>
Alias /icons/ "/home/www/icons/"
Alias /dompdf "/home/www/dompdf/"
Alias /mpdf "/home/www/mpdf/"
<IfModule mod_dav_fs.c>
DAVLockDB "/var/lib/dav/lockdb"
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/home/www/cgi-bin/"
</IfModule>
<IfModule cgid_module>
</IfModule>
<Directory "/home/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
DefaultType text/plain
<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon "/icons/unknown.gif"
ReadmeName "README.html"
HeaderName "HEADER.html"
AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
ForceLanguagePriority Prefer Fallback
AddDefaultCharset UTF-8
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddHandler type-map var
AddType text/html .shtml
AddHandler php5-script .php
AddType text/html .php
AddOutputFilter INCLUDES .shtml
<IfModule mod_negotiation.c>
<IfModule mod_include.c>
<Directory "/error">
AllowOverride None
Options IncludesNOEXEC
AddOutputFilter Includes html
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en es de fr
ForceLanguagePriority Prefer Fallback
</Directory>
</IfModule>
</IfModule>
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
Alias /tropical "/weatherbell.com/models/neytiri/maue/tropical"
Alias /weather "/weatherbell.com/models/neytiri/maue/weather"
Alias /~maue "/weatherbell.com/models/neytiri/maue/public_html"
<Directory />
#Options FollowSymLinks
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order deny,allow
Allow from all
</Directory>
<Directory "/home/www/htdocs">
Options FollowSymLinks Indexes
Allow from all
Order allow,deny
AllowOverride All
</Directory>
<Directory "/home/www/htdocs/weatherbell.com">
Options FollowSymLinks Indexes
Allow from All
Order Allow,Deny
AllowOverride All
</Directory>
<Directory "/home/www/htdocs/weatherbell.com/models">
#Options FollowSymLinks
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order deny,allow
Allow from all
</Directory>
<Directory "/home/www/icons">
Options FollowSymLinks Indexes MultiViews
Allow from all
Order allow,deny
AllowOverride None
</Directory>
<Directory "/home/www/dompdf">
Options FollowSymLinks Indexes MultiViews
Allow from all
Order allow,deny
AllowOverride All
</Directory>
<Directory "/home/www/mpdf">
Options FollowSymLinks Indexes MultiViews
Allow from all
Order allow,deny
AllowOverride All
</Directory>
<Directory "/home/www/cgi-bin">
Options None
Allow from all
Order allow,deny
AllowOverride None
</Directory>
<Directory "/neytiri/">
#Options FollowSymLinks
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order deny,allow
Allow from all
</Directory>
<Directory "/neytiri/maue/weather/">
#Options FollowSymLinks
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order deny,allow
Allow from all
</Directory>
<Directory "/home/www/htdocs/weatherbell.com/models">
#Options FollowSymLinks
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order deny,allow
Allow from all
</Directory>
<Directory "/home/www/htdocs/weatherbell.com/models/neytiri">
#Options FollowSymLinks
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order deny,allow
Allow from all
</Directory>
<VirtualHost *:80>
ServerName weather-bell.com
DocumentRoot "/home/www/htdocs/weatherbell.com/public"
ServerAdmin webmaster#dummy-host.example.com
ErrorLog "logs/weatherbell.com-error.log"
CustomLog "logs/weatherbell.com-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerName models.weather-bell.com
DocumentRoot "/home/www/htdocs/weatherbell.com/models"
Alias /weather "/neytiri/maue/weather"
ServerAdmin webmaster#dummy-host.example.com
ErrorLog "logs/models.weatherbell.com-error.log"
CustomLog "logs/models.weatherbell.com-access.log" common
</VirtualHost>
<VirtualHost *:80>
<Directory "/home/www/htdocs">
Options +Indexes
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:443>
DocumentRoot "/home/www/htdocs"
<Directory "/home/www/htdocs">
Options +Indexes
Allow from all
</Directory>
</VirtualHost>