httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Gingras <thu...@apache.org>
Subject Re: [users@httpd] HTTPS and .htaccess
Date Sun, 09 Sep 2018 03:12:18 GMT
You don't need to use .htaccess files, nor mod_rewrite. Run apachectl -S
and edit the appropriate vhost. Set the DocumentRoot and DirectoryIndex
properly, and also look into FallbackResource.

On Wed, Sep 5, 2018 at 2:09 AM Mahmood Naderan <nt_mahmood@yahoo.com.invalid>
wrote:

> Hi
>
>
> I have configured a Centos server with httpd for ssl support. Prior to
> that when I entered http://w.x.y.z I was able to see in the install page.
> After configuring ssl, I removed all files from /var/www/html and was
> able to see the test page when entering https://somewhere.com
>
>
> Now when I put website files in /var/www/html and enter
> https://somewhere.com, I get this error
>
>
> Not Found
> The requested URL /install/install.php was not found on this server.
>
>
> It seems that .htaccess file is incomplete for https access. However, I
> don't know what rules should I add. I also searched for similar things but
> didn't find a clear answer.
>
> The content of the virtualhost is
>
>
> [root@localhost html]# cat /etc/httpd/sites-available/moto.conf<VirtualHost *:443>
>     SSLEngine on
>     SSLCertificateFile /home/snadmin/certi/certificate-standard_wildcard.somewhere.crt
>     SSLCertificateKeyFile /home/snadmin/certi/certificate-standard_wildcard.somewhere.key
>     SSLCertificateChainFile /home/snadmin/certi/intermediate.crt
>     <Directory /var/www/html/>
>     Options FollowSymLinks
>     AllowOverride All
>           Order allow,deny
>           allow from all
>           Require all granted
>     </Directory>
>     DocumentRoot /var/www/html/
>     ServerName somewhere.com</VirtualHost>
>
>
> and the content of .htaccess is
>
>
> Options +FollowSymLinksRewriteEngine On
> AddEncoding gzip .gzAddEncoding gzip .gzip<FilesMatch "\.(js.gz|js.gzip)$">
>   ForceType text/javascript</FilesMatch><FilesMatch "\.(css.gz|css.gzip)$">
>   ForceType text/css</FilesMatch>
> <Files CHANGELOG.txt>
> deny from all</Files><Files INSTALL.txt>
> deny from all</Files><Files UPDATE.txt>
> deny from all</Files>
>
> RewriteCond %{REQUEST_URI} !^/index\.phpRewriteCond %{REQUEST_URI} !/ow_updates/index\.phpRewriteCond
%{REQUEST_URI} !/ow_updates/classesRewriteCond %{REQUEST_URI} !/ow_cron/run\.phpRewriteCond
%{REQUEST_URI} !/ow_cron/run\.phpRewriteCond %{REQUEST_URI} !/e500\.phpRewriteCond %{REQUEST_URI}
!/captcha\.php#RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.xml|\.feed|robots\.txt|\.raw|/[^.]*)$
 [NC]RewriteCond %{REQUEST_FILENAME} (/|\.php|\.html|\.htm|\.xml|\.feed|robots\.txt|\.raw|/[^.]*)$
 [NC]RewriteRule (.*) index.php
>
>
>
> Any thought?
>
>
> Regards,
> Mahmood
>

Mime
View raw message