Wordpress shows Index / - wordpress

When I open my website URL it shows Index /
1) I have index.php in the same directory
2) Config file at /etc/apache2/sites-available/example.com.conf
has following code:
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/intricare>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
DirectoryIndex index.php
Order allow,deny
allow from all
</Directory>
If I Refresh the URL again it loads the website without issue.
URL: intricare.net

Your problem is a cache somewhere on your network. When you manually refresh the site, your browser sends an extra header telling the server it desires a fresh copy: cache-control: no-cache.
If that header is sent, the current/correct version of the page is returned. If it is not, the cached directory listing is.
If you have curl installed, you can test it yourself with
curl https://www.intricare.net/
and
curl -H "cache-control:no-cache" https://www.intricare.net/
The latter produces the correct output.
If you're using any caching plugins: make them clear the cache. It might also be your hosting provider that is providing the cache, in that case look at their FAQs or ask them how to clear it.

Related

Apache2/WordPress giving SSL_VERSION_OR_CIPHER_MISMATCH when viewed externally

I'm hosting a site for a local company. Without SSL, the website loads fine, but when we try to access it securely, I get ERR_SSL_VERSION_OR_CIPHER_MISMATCH (Except for when I try to view it locally)
When I go to check the logs, I don't see any issues. I've set the log level for this site to be debug, and I see a bunch of lines saying that authorization is granted, so I don't think the issue is with Apache2, but I don't know what the issue might be.
In the WordPress control panel, I've gone in and tried to make sure that all SSL controls there are disabled.
Here's my SSL config for the site:
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
#SKIP log and serverAlias settings, as well as DocumentRoot. I can provide it it's really necessary
<Directory />
Options FollowSymLinks
AllowOverride Limit Options FileInfo
Require all granted
DirectoryIndex index.php
Allow from all
Order allow,deny
</Directory>
<Directory path/>
Options FollowSymLinks
Order allow,deny
Allow from all
</Directory>
#SKIP SSLCert paths. CA is GoDaddy
When I use https://www.ssllabs.com/ssltest it comes back with an 'A' rating, so I'm confident that I've got everything set up, which makes me even more lost.
A cybersec friend suggested the issue might be a keying issue with the certificate.
Needed to re-key the certificate, which resolved the error.

non www to www not working for wordpress in EC2 instance using safari

If I use my safari browser, I cannot get to my website example.com. I have to use www.example.com for it to work. I tried editing htaccess numerous times and still, it doesn't work.My website is using bitami wordpress image (https://docs.bitnami.com/)which is hosted in AWS.
Bitnami Engineer here:
By default, we disable .htaccess files due to security and performance reasons. We also move .htaccess files content to a file called htaccess.conf in the folder /opt/bitnami/apps/wordpress/conf. You can check more about it at https://docs.bitnami.com/aws/infrastructure/lamp/administration/use-htaccess/.
If you want to enable .htaccess usage, you would need to set it to AllowOverride All in /opt/bitnami/apache2/conf/bitnami/bitnami.conf file:
<VirtualHost _default_:80>
DocumentRoot "/opt/bitnami/apache2/htdocs"
<Directory "/opt/bitnami/apache2/htdocs">
Options Indexes FollowSymLinks
AllowOverride All <---- HERE
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3 >
Require all granted
</IfVersion>
</Directory>
And restart Apache after applying your changes.
For more info, find WordPress documentation below:
https://docs.bitnami.com/aws/apps/wordpress/
Regards

Redirect Page Url to homepage `.htaccess`

I'm noob when it comes to .htaccess tricks.
However, I have a page http://example.com/register and when a user enters this URL, I want this page to redirect directly to Homepage or let's say any other page.
I've inserted following code inside .htaccess, but it's not working.
#Redirect to Homepage
Redirect 301 /register http://www.example.com/
Anything I'm missing here?
Check your apache server setting.
Is AllowOverride setted on your root directory.
For example:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
See How to Set AllowOverride all

How to open my website with secure http (https)?

The company I'm working for has a PC for hosting our website. I can access the website with http without any problem but when I add https it gives me this error. We are using apache for our web server (XAMPP).
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
However when I try to copy the website to my other computer (also with XAMPP on it) and run the website in localhost with https its working fine. I tried to look for answer but I can't seem to find the one that I'm looking for. Does anyone have encountered this problem or know what may have caused this?
Thanks in advance
Had same issue on LAMP server. In the ssl.conf file we changed AllowOverride None for ; to AllowOverride All. That corrected the problem.
DocumentRoot /var/www/
< Directory />
Options FollowSymLinks
AllowOverride None
< /Directory>
< Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
< /Directory>
I fixed the problem. It was because the DocumentRoot directory and Servername in http-ssl.conf in apache/conf/extra folder was still set on default. I changed it so it uses the same servername and documentroot directory that I had specified in httpd-vhosts.conf

Wordpress permalink not working on aws

I have spent 4-5 hours to sort it out but not able to solve it.
I have setup my wordpress website on AWS.Everything is working file except the permalinks of wordpress.
When permalinks are set to default pages/posts are working but not working with "%post-name%".
I have tried almost all the things by searching over google but no success.
I saw so many solutions all related to httpd.conf file but on my root there is no file httpd.conf neither no directory of http.
I changed the following code in apache.conf file but still not working
<Directory />
Options FollowSymLinks
AllowOverride All
Require all denied
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Restarted apache again and again but no luck.
Please help me guys.
Thanks.
I've just managed to fix this error. Make sure you restart Apache service after making the httpd.conf change!
Documentation here has a checklist of all the changes you need to get wordpress working correclty on AWS - including getting permissions correct: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hosting-wordpress.html
The bit you need to fix for permalinks is tp update the httpd.conf file
(1) Location: /etc/httpd/conf/httpd.conf
(2) Find the section that starts with <Directory "/var/www/html">
<Directory "/var/www/html">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Require all granted
Change the AllowOverride None line in the above section to read AllowOverride All
Note
There are multiple AllowOverride lines in this file; be sure you change the line in the section.
AllowOverride All
(3) Restart the Apache service
If you dont have much experience using aws, then i guess its because you have not granted enough permissions to your apache. If you are unware of how to grant permissions to your apache, you can use this command in your console
sudo CHOWN -R apache:apache /var/www/html
Once done try going to your settings page and saving the new settings.

Resources