logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: [SOLVED] Apache 2.4.10 - No Rewrite possible
Author
Kenyan



Joined: 10 Dec 2015
Posts: 2
Location: Germany

PostPosted: Thu 10 Dec '15 18:25    Post subject: [SOLVED] Apache 2.4.10 - No Rewrite possible Reply with quote

Hello there,

I have still the problem that rewrite after upgrading from Apache 2.2 no longer works on 2.4.10.
If I start with the accompanying configs https://www.surface.com in the browser, there is no problem. But as soon as I use http://www.surface.com or surface.com on browser, I only see the "index of" the directory level of the hard drive.

000-default.conf
Code:
<VirtualHost 192.168.1.7:80>
        ServerAdmin hostmaster@surface.com
        DocumentRoot /srv/www/typo3cms/surface.com
        ServerName www.surface.com
        ServerAlias surface.com
        <Directory /srv/www/typo3cms/surface.com/>
                Options +Indexes +FollowSymLinks +MultiViews
                AllowOverride All
                Require all granted
                Allow from all
        </Directory>
        ScriptAlias /scripts "/srv/www/typo3cms/surface.com/scripts/"
        <Directory "/srv/www/typo3cms/surface.com/scripts/">
                AllowOverride All
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Require all granted
                Allow from all
         </Directory>
        Alias /Admin "/srv/www/typo3cms/surface.com/typo3/"
        <Directory "/srv/www/typo3cms/surface.com/typo3/">
                Options -Indexes +MultiViews +FollowSymLinks
                AllowOverride All
                Require all granted
                Allow from all
        </Directory>
        ScriptAlias /cgi-bin/ "/srv/www/typo3cms/surface.com/cgi-bin/"
        <Directory "/srv/www/typo3cms/surface.com/cgi-bin/">
                AllowOverride None
                Options +ExecCGI
                AddHandler cgi-script .cgi .pl
                Require all granted
                Allow from all
        </Directory>
        ErrorLog /var/log/apache2/www.surface.com-error.log
        LogLevel debug
        CustomLog /var/log/apache2/www.surface.com-access.log common
        ServerSignature On
        <IfModule mod_rewrite.c>
                RewriteEngine on
                LogLevel  alert rewrite:trace3
                RewriteCond %{HTTP_HOST} ^www.surface.com$ [NC]
                RewriteRule ^(.*) https://www.surface.com$1 [L,R=301]
                RewriteCond %{HTTP_HOST} ^surface.com$ [NC]
                RewriteRule ^(.*) https://surface.com$1 [L,R=301]
        </IfModule>
</VirtualHost>
<VirtualHost *:443>
        ServerName www.surface.com
        DocumentRoot /srv/www/typo3cms/surface.com
        <Directory /srv/www/typo3cms/surface.com/>
                Options +Indexes +FollowSymLinks +MultiViews
                AllowOverride All
                Require all granted
                Allow from all
        </Directory>
        ErrorLog /var/log/apache2/www.surface.com-error.log
        LogLevel debug
        CustomLog /var/log/apache2/www.surface.com-access.log common
        SSLEngine on
        SSLProtocol all -SSLv2
        SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM
        SSLCertificateFile /etc/startssl/surface.com/surface.com.crt
        SSLCertificateKeyFile /etc/startssl/apache_server.key
</VirtualHost>

apache2.conf
Code:
Mutex file:${APACHE_LOCK_DIR} default
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel debug
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf
<Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all denied
</Directory>
<Directory /usr/share>
        AllowOverride None
        Require all granted
</Directory>
<Directory /srv/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>
AccessFileName .htaccess
<FilesMatch "^\.ht">
        Require all denied
</FilesMatch>
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf


Modules

Code:
apache2ctl -M
[Thu Dec 10 16:57:51.405376 2015] [core:error] [pid 4952] (EAI 2)Name or service not known: AH00547: Could not resolve host name + -- ignoring!
Loaded Modules:
 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 unixd_module (static)
 access_compat_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 fcgid_module (shared)
 filter_module (shared)
 mime_module (shared)
 mpm_prefork_module (shared)
 negotiation_module (shared)
 php5_module (shared)
 proxy_module (shared)
 proxy_http_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 socache_shmcb_module (shared)
 ssl_module (shared)
 status_module (shared)

If I use the URL without "https: //", then stands in the error.log these entries:
Code:
[Thu Dec 10 16:48:23.070986 2015] [authz_core:debug] [pid 4860] mod_authz_core.c(809): [client 94.224.187.102:38645] AH01626: authorization result of Require all granted: granted
[Thu Dec 10 16:48:23.070992 2015] [authz_core:debug] [pid 4860] mod_authz_core.c(809): [client 94.224.187.102:38645] AH01626: authorization result of <RequireAny>: granted
[Thu Dec 10 16:48:23.071075 2015] [authz_core:debug] [pid 4860] mod_authz_core.c(809): [client 94.224.187.102:38645] AH01626: authorization result of Require all granted: granted
[Thu Dec 10 16:48:23.071083 2015] [authz_core:debug] [pid 4860] mod_authz_core.c(809): [client 94.224.187.102:38645] AH01626: authorization result of <RequireAny>: granted
[Thu Dec 10 16:48:23.071176 2015] [deflate:debug] [pid 4860] mod_deflate.c(855): [client 94.224.187.102:38645] AH01384: Zlib: Compressed 2460 to 547 : URL /


Perhaps I overlooked a configuration error or doing something else wrong. Can someone help me here somebody?

Regards

Kenyan
Back to top
Kenyan



Joined: 10 Dec 2015
Posts: 2
Location: Germany

PostPosted: Fri 11 Dec '15 9:38    Post subject: Reply with quote

Solution is the change of the IP address. There was still in the config file the old IP of the old server. 7 was changed to 8.
Back to top


Reply to topic   Topic: [SOLVED] Apache 2.4.10 - No Rewrite possible View previous topic :: View next topic
Post new topic   Forum Index -> Apache