XF 1.5 Strange behavior after switch to SSL

teletubbi

Well-known member
Short time ago i changed from http to https.

But i messed somthing up.

I have this error in apache logs.

PHP:
PHP Warning:  require(/var/www/html/domaindirectory/www/library/XenForo/Autoloader.php): failed to open stream: No such file or directory in /var/www/html/domaindirectory/www/index.php on line 6, referer: https://www.pattayaforum.net
PHP Fatal error:  require(): Failed opening required '/var/www/html/domaindirectory/www/library/XenForo/Autoloader.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/domaindirectory/www/index.php on line 6, referer: https://www.pattayaforum.net

On both lines there is a directory missing.

'/var/www/html/domaindirectory/www/forums/library/XenForo/Autoloader.php

My domain if called with http with or without www brings up only a empty page.

My htaccess:

HTML:
#    Mod_security can interfere with uploading of content such as attachments. If you
#    cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
#    SecFilterEngine Off
#    SecFilterScanPOST Off
#</IfModule>
#php_value include_path ".:/var/www/html/domaindirectory/www/forums/library/XenForo"
ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 405 default
ErrorDocument 406 default
ErrorDocument 500 default
ErrorDocument 501 default
ErrorDocument 503 default


<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymLinks
RewriteCond %{HTTP_USER_AGENT} ^WordPress [NC]
RewriteRule .* - [F,L]
#RewriteCond %{HTTPS} off
#RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#RewriteCond %{HTTP_HOST} !^www\. [NC]
#RewriteRule ^(.*)$ https://www.pattayaforum.net/forums/$1 [L,R=301]
RewriteRule ^forum/member\.php/([0-9]+)-.*$ /members/$1/ [R=301,L]
    #    If you are having problems with the rewrite rules, remove the "#" from the
    #    line that begins "RewriteBase" below. You will also have to change the path
    #    of the rewrite to reflect the path to your XenForo installation.
    RewriteBase /forums

    #    This line may be needed to enable WebDAV editing with PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
  
</IfModule>

My vhost:

HTML:
<VirtualHost pattayaforum.net:80>
ServerName pattayaforum.net
Redirect permanent / https://www.pattayaforum.net
</VirtualHost>
<VirtualHost pattayaforum.net:80>
ServerName www.pattayaforum.net
Redirect permanent / https://www.pattayaforum.net/forums/threads/featured
</VirtualHost>


<IfModule mod_ssl.c>
<VirtualHost pattayaforum.net:443>
#Header always set Strict-Transport-Security "max-age=63072000; includeSubdomain$
DocumentRoot /var/www/html/domaindirectory/www
ServerName pattayaforum.net
ServerAlias www.pattayaforum.net
ServerAdmin webmaster@localhost
ErrorLog /var/log/apache2/pattayaforum.net/pattayaforum_net_ssl_error.log
CustomLog /var/log/apache2/pattayaforum.net/pattayaforum_net_ssl_access.log combined
<Directory /var/www/html/domaindirectory/www/>
Options Indexes FollowSymLinks MultiViews Includes ExecCGI
AllowOverride All
Require all granted
RewriteEngine On
RewriteRule ^archive/index\.php/t-([0-9]+)-p-[0-9]+\.html$ /forums/threads/$1/ [R=301,L]     
RewriteRule ^forum/forumdisplay\.php/([0-9]+)-.*$ /forums/$1/ [R=301,L]
RewriteRule ^forum/member\.php/([0-9]+)-.*$ /members/$1/ [R=301,L]
RewriteRule ^forum/showthread\.php/([0-9]+)-.*$ /threads/$1/ [R=301,L]
RewriteRule ^attachments/(.+)/([0-9]+)d(.+)$ attachment.php?attachmentid=$2 [L]
redirect 301 /forum/register.php /forums/register
redirect 301 /forum/login.php /forums/login
redirect 301 /forum/album.php /forums/media/albums
redirect 301 /forum/redirector.php /forums/threads/featured
redirect 301 /forum/entry.php /forums/treads/featured
redirect 301 /forum/faq.php /forums/help
redirect 301 /forum/search.php /forums/search
redirect 301 /forum/content.php /forums/threads/featured
redirect 301 /forum/forum.php /forums
redirect 301 /forum/blog.php /forums/threads/featured
redirect 301 /forum/tags.php /forums/tags
redirect 301 /forum/list.php /forums/threads/featured
redirect 301 /forum/vbcms.php /forums/threads/featured
redirect 301 /forum/index.php /forums/threads/featured
redirect 301 /forum/image.php /forums/media/albums

</Directory>
#RewriteEngine on
SSLCertificateFile /etc/letsencrypt/..........
SSLCertificateKeyFile /etc/letsencrypt/..........
Include /etc/letsencrypt/options-ssl-apache.conf
#RewriteCond %{HTTP_HOST} !^www\. [NC]
#RewriteRule ^(.*)$ https://www.pattayaforum.net/forums/$1 [L,R=301]
#RewriteCond %{HTTP_HOST} !^www\.(.+)$ [NC]
#RewriteRule ^ https://%1%{REQUEST_URI} [L,R=301]
</VirtualHost>
</IfModule>

I put a 301 redirection in htaccess what makes the error gone and the domain can be accessed in any writing (with or without https or www)

redirect 301 /index.php https://www.pattayaforum.net/forums/threads/featured

But this can't be the solution.

The rest of the forum work like expected.
 
It sounds to me like you have an index.php file at the root of your domain that is the standard XenForo index.php, but none of the other files. You can't pull out individual files like that. In that instance, you'll need the extra redirect line or something like that to redirect you to the correct location.
 
Back
Top Bottom