Question

SSL and HTTPS:// and HTTP:// URL issues on WordPress Ubuntu 14.04

We’ve been trying to figure out why after installing wordpress within the var/www/html directory on LAMP running ubuntu 14.04 (which is said to be the standard location for the uploaded files), that the SSL enabled site is not registering as one address, but as multiple addresses,(such that after WordPress installation completed from the browser on the https:// address, we’d check the http:// location and it would appear as an "Index of/ page just showing a folder directory icon titled “html”, while the other https address correctly shows the page for a newly installed wp site. ) When WordPress was uninstalled, and then reinstalled from within the browser at the http:// location, the install program appeared within a subdirectory http://domain.com/html/wp-admin/install.php. After completion of the install, the site is shows up only from within the html/ subdirectory location, so if www.domain.com/wp-admin is typed, a “Not found” page shows. Any information would be greatly appreciated.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

try this on your 000-default.conf, and then reload or restart apache :


<VirtualHost *:80>
        ServerName domain.com
        ServerAlias www.domain.com


      DocumentRoot /var/www/html
      ErrorLog ${APACHE_LOG_DIR}/error.log
      CustomLog ${APACHE_LOG_DIR}/access.log combined

	<Directory /var/www/html>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		allow from all
                Require all granted
	</Directory>

</VirtualHost>

<VirtualHost *:443>
        ServerName domain.com
        ServerAlias www.domain.com


	<Directory /var/www/html>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		allow from all
                Require all granted
	</Directory>


        ServerAdmin webmaster@domain.com
        DocumentRoot /var/www/html
        SSLEngine on
        SSLCertificateFile /home/me/domain.com.crt
        SSLCertificateKeyFile /home/me/domain.com.key
        SSLCACertificateFile  /home/me/domain.com.crt

 
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined


</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

I enabled HTTP2 after struggling a lot and now internal pages (wordpress) are not working. 404 error.

https://misg.in

Hi,

I have Ubuntu 14.04 and using WordPress multi-site with sub-directory installation. I have installed SSL certificate following the below tutorial.

https://www.digitalocean.com/community/tutorials/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-14-04

Problem is, if I check the home page it is working fine with https:// but if I check any page of the site, it is showing the below 404 error with https://


"Not Found

The requested URL /login/ was not found on this server.

Apache/2.4.7 (Ubuntu) Server at {mysiteurl} Port 443


I even added define(FORCE_SSL_ADMIN, true); in my wp-config,php but of no use. It is showing 404

Please confirm whether any special settings are to be done in WordPress for SSL certificate.

If I am replacing http:// with https:// in my database it is showing “Error establishing database connection” or 404 to every page except home page.