• [ Moderator Note: Please post code or markup snippets between backticks or use the code button. Or better still – use the pastebin ]

    Hi everyone,

    I am not sure whether I have my configurations wrongly. I am using the updated wordpress version.

    My website e.g. https://www.mydomain.com.

    I can view mydomain.com but not https://www.mydomain.com. It will not show page can’t be displayed or loads forever.

    I am using Ubuntu 10.04 LTS 64 bits and apache2.

    Any help please? Thank you.

    My .htaccess as below:-

    Note: I tried the commented version, but it didn’t work or worst show error 500

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    #RewriteCond %{HTTP_HOST} ^mydomain.com$
    #RewriteRule ^(.*)$ "http\:\/\/www\.mydomain\.com\/$1" [R=301,L]
    #RewriteCond %{HTTP_HOST} *!^www*.mydomain\.com [NC]
    #RewriteRule (.*) https://www.mydomain.com/$1 [L,R=301]
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    In /etc/apache2/sites-available/mydomain.com (ln -s in sites-enabled)

    <VirtualHost *:80>
            ServerName mydomain.com
            #ServerAlias *.mydomain.com (can't work)
            #ServerAlias www.mydomain.com (can't work too)
            ServerAdmin webmaster@localhost
    
            DocumentRoot /home/myuser/mydomain.com/public
    
            <Directory />
                    Options FollowSymLinks
                    AllowOverride All
            </Directory>
    
            <Directory /home/myuser/mydomain.com/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride All
                    Order allow,deny
                    allow from all
            </Directory>
    
            <Directory "/home/myuser/mydomain.com/public">
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride All
                    Order allow,deny
                    allow from all
            </Directory>
    
            <Directory "/home/myuser/mydomain.com/public/">
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride All
                    Order allow,deny
                    allow from all
            </Directory>
    
            ErrorLog /home/myuser/mydomain.com/logs/error.log
    
            # Possible values include: debug, info, notice, warn, error, crit,
            # alert, emerg.
            LogLevel warn
    
            CustomLog /var/log/apache2/access.log combined
    
    </VirtualHost>

    In /etc/apache2/sites-available/default, I didn’t modify anything

    <VirtualHost *:80>
            ServerAdmin webmaster@localhost
    
            DocumentRoot /var/www
            <Directory />
                    Options FollowSymLinks
                    AllowOverride None
            </Directory>
            <Directory /var/www/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride None
                    Order allow,deny
                    allow from all
            </Directory>
    
            ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
            <Directory "/usr/lib/cgi-bin">
                    AllowOverride None
                    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                    Order allow,deny
                    Allow from all
            </Directory>
    
            ErrorLog /var/log/apache2/error.log
    
            # Possible values include: debug, info, notice, warn, error, crit,
            # alert, emerg.
            LogLevel warn
    
            CustomLog /var/log/apache2/access.log combined
    
        Alias /doc/ "/usr/share/doc/"
        <Directory "/usr/share/doc/">
            Options Indexes MultiViews FollowSymLinks
            AllowOverride None
            Order deny,allow
            Deny from all
            Allow from 127.0.0.0/255.0.0.0 ::1/128
        </Directory>
    
    </VirtualHost>

  • The topic ‘Website can't be accessed with www.domain.com?’ is closed to new replies.