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

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

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.

Object not found! wordpress

I locally setup a wordpress project by using a backup and the sub pages are not working in the project only giving the error message below eg- when i tried to go to the about us page it gives the below error in the browser
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
localhost
Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.2.26
It's look like server error, Please confirm that you have correctly setup vertual host.
Here is code to create virtual host.
On Xampp:
<VirtualHost wp.local:80>
DocumentRoot "D:\dev\wp"
ServerName wp.local
ServerAlias wp.local
<Directory "D:\dev\wp">
DirectoryIndex index.php
Require all granted
Allowoverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

change default folder for apache

I have installed a Wordpress instance using Bitnami.
Currently 127.0.0.1 takes my to the file in the C:\Bitnami\wordpress-4.4.2-1\apache2\htdocs
I want 127.0.0.1 to take the user to C:/Bitnami/wordpress-4.4.2-1/apps/wordpress/htdocs
Changes i have done:
Edit the httpd.conf file
DocumentRoot "C:/Bitnami/wordpress-4.4.2-1/apps/wordpress/htdocs"
<Directory "C:/Bitnami/wordpress-4.4.2-1/apps/wordpress/htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Require all granted
allow from all
</Directory>
Restarted apache server
Still going to 127.0.0.1 shows the index.php page under C:\Bitnami\wordpress-4.4.2-1\apache2\htdocs
What am i missing?
I don't know about Windows, but on my Ubuntu system, I also had to change document root in the sites-enabled/000-default.conf file. Just make sure all configuration files are updated correctly to point to your new document root.
Hope this helps!

Wordpress returns IP address instead of domain

This was working for years until I did something that has now jacked this up....
Searching on this topic landed me in several places that basically said: You need to check the Wordpress URL and the site URL in the general settings in Wordpress. I have done so and they are both: http://www.petesworkshop.com/blog_wp . Yet, when I hit that URL I am redirected to my internal IP and get a error http://10.0.10.206/blog_wp (yep, that would be wrong!
Interestingly enough, I can get to the admin page just fine and it is just a subfolder of blog_wp. So, somehow things directed to /blog_wp return the IP but everything else is OK. Wierd.
Wordpress sits behind an Apache proxy which has this directive for the virtual host:
<VirtualHost *:80>
ServerName www.petesworkshop.com
ServerAlias petesworkshop.com
ProxyPass / http://10.0.10.206:5080/
ProxyPassReverse / http://10.0.10.206:5080/
</VirtualHost>
The server running the website behind the proxy has this:
DocumentRoot "/www/petes/htdocs/petesworkshop/"
ServerName www.petesworkshop.com
ServerAlias petesworkshop.com
DirectoryIndex index.html index.php index.htm
ErrorLog logs/petesworkshop.log
Options FollowSymLinks
Alias /blog_wp /www/petes/htdocs/petesworkshop/blog_wp
<Directory /www/petes/htdocs/petesworkshop/blog_wp >
Order Allow,Deny
Allow From all
</Directory>
<Directory /www/petes/htdocs/petesworkshop >
Order Allow,Deny
Allow From all
</Directory>
I am not sure how I jacked this up...it is probably something that I did to the Apache configuration but I can't be sure since everything else behind the proxy works fine. I even tried adding specific ProxyPass entries for /blog_wp but that didn't make any difference.
Stumped...
Check your wp-config.php for correct urls
like below
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
This one turned out to be an Apache proxy issue. What I needed was to add 'ProxyPreserveHost On' to the configuration, which I thought I had in there originally but I either removed it in an edit or had it placed in the wrong virtual host. In any case, adding the ProxyPreserveHost On flag, took care of the issue. Not sure why other entries in the same virtual host DID work without it but I am not going to worry about it.
I had a similar problem some time ago, whenever I wrote my domain in the browser it was solved correctly but my domain name was changed by the IP, after much research it turned out that the problem was in the hosting, not in the server, so which only change the configuration of my domain in GoDaddy since I was only doing a redirection but the correct thing was to create an A record that points to # (which represents your domain name) and everything started to work correctly. I hope it's help

Hosting multiple domains in Apache2 - how?

Although I’ve found related articles on stackoverflow, I have seen various suggestions which I’ve tried out but I still experience problems, so that’s the reason why I’m posting this.
I have a question which involves DNS, Debian, Apache2 and Wordpress. I’ve been struggling with this for some time now and haven’t been able to solve it. My current conclusion is that 2there is something with my dns and apache virtual host definitions”, but, as I said I’m far from sure.
This is what my config looks like:
two domains which I “own” hosted by moniker.com - let’s call them domaina and domainb
a hosted vps with Debian, apache2 and wordpress. The vps has ip x.y.z.t
each domain has three ‘A’ records defined: ‘*’, ‘#’ and ‘www’
URL rewrite enabled (a2enmod rewrite)
Wordpress installed and links created to the wordpress directory for both document directories specified in the virtualhost directives below
Both ‘domaina’ and ‘domainb’ point to my vps and this is working ok. However, what I’ve been unable to solve is to have the vps handle “multiple virtual hosts”. I thought I would be able to handle this by using virtual hosts in Apache. For that purpose I’ve defined two sites under /etc/apache2/sites-available which looks like this:
(file: /etc/apache2/sites-available/domaina.com)
<VirtualHost x.y.z.t:80>
ServerName domaina.com
ServerAdmin me#domaina.com
DocumentRoot /var/www/domaina.com
DirectoryIndex index.php
<Directory /var/www/domaina.com/>
AllowOverride all
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
(file: /etc/apache2/sites-available/domainb.com)
<VirtualHost x.y.z.t:80>
ServerName domainb.com
ServerAdmin me#domainab.com
DocumentRoot /var/www/domainb.com
DirectoryIndex index.php
<Directory /var/www/domainb.com/>
AllowOverride all
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
Now, when I try to address the sites above from a web-browser I end up at the default apache directory with the index.html file rendered in the browser instead of arriving at the two different wordpress configurations. Obviously there’s something wrong with my thinking around “VirtualHosts” and/or DNS-configurations…
I forgot to mention that I've made loads of /etc/unit.d/apache2 restarts... Sorry...
Frankly speaking I’m lost here and any help on this would be very much appreciated.
Cheers
If you did restart apache and its still not working please respond, as I have experienced similar issues with Apache, especially when getting the virtual host to work. I realise your running on Debian which is different to WAMP, but this is what I do when opening a new virtual host.
First I add the domain to the windows system 32 drivers etc hosts file, it allows for intranet
127.0.0.1 domainname and this stops the url from looking to the web.
Then I have to add the corret directories to the www/your folder.
Just inside the root folder there ought to be a directory called vhosts,
I had to make totaly empty instances of the conf files with just the filename of the virtual hosts inside it so that the changes you made to the httpd-vhosts.conf works.
So what you will need to do is find the wamp/bin/apache/Apache2.2.21/conf/extra/httpd-vhosts makes sure that you have the one from the conf/axtra and not conf/orginal.
<VirtualHost *:80>
DocumentRoot "c:/wamp/www/**name of the folder**"
ServerName **as_inserted_in_hosts**
<directory "c:/wamp/www//**name of the folder**">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</directory>
</VirtualHost>
Save. Apache stop all services, I also have to restart the service running the intranet in windows to update the changes to the hosts file and then restart apache.
This is what I have to do so that when I open localhost from Apache it allows me to see the links appear under virtual hosts as well as the directories appearing under your projects.
Have a look at this tutorial... Explains how to set up virtual hosts
Do you have a NameVirtualHost directive in your apache2.conf anywhere? You'll need that to enable virtual hosting. It can go in apache2.conf or any file included by apache2.conf. On my server I've got it in ports.conf.
NameVirtualHost *:80
See http://httpd.apache.org/docs/2.2/vhosts/name-based.html#using

Resources