https returning 404

Hi all,

Seeing if I can get OwnCloud to work on my site, I thought I had it working properly before however now I’m getting that http://cloud1.katronixhosting.com/status.php returns the desired result, however https://cloud1.katronixhosting.com/status.php returns a 404.

Can someone suggest any reasons as to why this is? do https files get stored elsewhere?

Thanks,

Kat

Hi katronix

I hope you don’t mind, but have you activated https on the siteworx account.

By that, I mean have you setup SSL and either installed a paid cert or generated one.

I think this needs completing for https to work

I could be wrong so apologies in advance if I am

Many thanks

John

Hey John,

How would I do that? if you could point me to some documentation that would be great.

Kat

Hi Kat

Many thanks and first you need to make sure SNI is turned on (this allows for SSL sharing on a single IP address) from nodeworx, server, settings - it’s towards the bottom of the page and save it.

Then login to your siteworx account, hosting features, domains, SSL - generate private key, create signing request/SSL certificate unless you have a paid SSL, which I’m guessing you do not.

If the SSL section is not displayed, go back to nodeworx, siteworx, edit your siteworx account and ensure SSL is enabled, save and follow siteworx above for SSL.

Then you should be good to go

I hope that helps

Many thanks

John

Hi John, not seeing SNI however the issue is that if you visit https://cloud1.katronixhosting.com/status.php you get a 404, but http://cloud1.katronixhosting.com/status.php doesn’t do this. There is a self signed SSL in place.

Hi Kat

Many thanks and apologies, you do not need SSL for https, but is better to have it set for siteworx if using https, even if self signed.

I’m sorry I do not use owncloud but please have a read of this post, which sounds similar to your issue.

Would you mind updating your post once it is resolved, as it may help others who in the future try owncloud.

Many thanks

John

Hi John,

I’m thinking OwnCloud doesn’t have anything to do with this issue. What would you say if my problem was simply:

https://katronixhosting.com returned a 404 but http://katronixhosting.com works fine?

(yes I know this is not a real case in my instance, but please try to answer why that could be an issue).

Kat

Hi Kat

Yes I agree with you, rather it is an Apache siteworx vhost issue.

There are no seperate hosting files for https, they use same files as http.

I suspect you have wrong root folder listed in vhost for https, or it is wrong folder for owncloud, but to look into further, I would need to load owncloud but I cannot today sorry.

The post I linked too has the same issue as your asking, have you tried that solution.

Many thanks

John

[QUOTE=Katronix;27670]Hi all,

Seeing if I can get OwnCloud to work on my site, I thought I had it working properly before however now I’m getting that http://cloud1.katronixhosting.com/status.php returns the desired result, however https://cloud1.katronixhosting.com/status.php returns a 404.

Can someone suggest any reasons as to why this is? do https files get stored elsewhere?

Thanks,

Kat[/QUOTE]

It’s obvious that your httpd setup is working correctly to a degree, at least. With the non-HTTPS link, it obviously works, but HTTPS obviously does not work, either even though logically it should.

I’m assuming you’ve checked all HTTP/SSL related settings in InterWorx, Katronix?

[QUOTE=Katronix;27672]Hey John,

How would I do that? if you could point me to some documentation that would be great.

Kat[/QUOTE]

Here’s How to Set up a SSL Certificate, Manage SSL Certificates for System Services, InterWorx’s NodeWorx Documentation for WebServer.

Server Name Indication support should be found where John described. Obviously though, you have your own SSL certificate working but I’m not quite sure what the issue is, at least not without knowing what the configuration looks like. You may wish to post all httpd configs, what you did to add OwnCloud to your config and we’ll check it out.

Hi kerio and Kat

I checked your last links which https showed as working https://katronixhosting.com, so SSL does appear to work.

I also tried your posted https owncloud link, which did show 404 error, but deleting status.php, so your referencing the subdonain, correctly showed SSL working (albeit it was the default siteworx holding page, but the links contained within correctly showed the subdonain)

This then I think is where the doc root is wrong, as per my post.

I could be wrong though as I only looked briefly and as kerio has posted, more details are needed in full to help

Many thanks

John

Hey all,

Sorry for the delay in replying http://pastebin.com/HH34ru3t has my httpd.conf file for a month as of this posting.

My vhost.conf for greensnakedesign.com (which is another domain having the same issue):

http://pastebin.com/SyKt6pN0

My ssl.conf has http://pastebin.com/JqXJ0RCY

Hi Katronix
Many thanks, and I can see why your SSL is not working but not too sure why the missing SSL information has not been inserted into your vhost file upon first install of SSL.
Please could you add the following into your vhost for the domain (goes directly at the end of the file).
I have tried to edit the information so it matches your current vhost for http, but replace, copy and paste is prone to mistakes sorry (or rather my eyes are sorry).
Once saved, the test to see if it corrects the issue. This may fail though, if your SSL certs are not created and not in the correct folder /home/gsd/var/greensnakedesign.com/ssl
As another test, if you would not mind, please could you create a new siteworx account, call it what you want, then add a SSL self cert from the siteworx account login, ie login to the siteworx account, hosting features, domains, SSL and create the SSL here, using Interworx, then SSH into server and view the vhost file, where you should see the SSL shown, infact, if you could post the whole vhost file that would be good.
I hope you don’t mind me posting the actual domain/IP, which is public and you have posted already.
Lastly, what folder is your SSL.conf taken from.
If you could update the post it would be good.
I hope that helps
Many thanks
John
<VirtualHost 173.240.15.114:443>
SuexecUserGroup gsd gsd
DocumentRoot /home/gsd/greensnakedesign.com/html
ServerName greensnakedesign.com
ServerAlias www.greensnakedesign.com ftp.greensnakedesign.com mail.greensnakedesign.com
ServerAdmin webmaster@greensnakedesign.com

subdomain logic

RewriteEngine On
RewriteOptions inherit
RewriteCond %{HTTP_HOST} !^www.greensnakedesign.com [NC]
RewriteCond %{HTTP_HOST} !^greensnakedesign.com [NC]
RewriteCond %{HTTP_HOST} ^([A-Z0-9a-z-.]+).greensnakedesign.com [NC]
RewriteCond %{DOCUMENT_ROOT}/%1 -d
RewriteRule ^(.+) %{HTTP_HOST}/$1 [C]
RewriteRule ^([0-9A-Za-z-.]+).greensnakedesign.com/?(.)$ %{DOCUMENT_ROOT}/$1/$2 [L]
RewriteCond %{HTTP_HOST} ^www.([A-Z0-9a-z-.]+).greensnakedesign.com [NC]
RewriteCond %{DOCUMENT_ROOT}/%1 -d
RewriteRule ^(.+) %{HTTP_HOST}/$1 [C]
RewriteRule ^www.([0-9A-Za-z-.]+).greensnakedesign.com/?(.
)$ %{DOCUMENT_ROOT}/$1/$2 [L]

end subdomain logic

ErrorLog /home/gsd/var/greensnakedesign.com/logs/error.log
CustomLog /home/gsd/var/greensnakedesign.com/logs/transfer.log combined

php: default don’t edit between this and the “end php” comment below

<IfModule mod_suphp.c>
suPHP_Engine On
suPHP_UserGroup gsd gsd
AddHandler x-httpd-php .php
suPHP_AddHandler x-httpd-php .php
suPHP_ConfigPath /home/gsd/etc
</IfModule>
<IfModule !mod_suphp.c>
<IfModule mod_php5.c>
php_admin_flag engine On
</IfModule>
<IfModule mod_php4.c>
php_admin_flag engine On
</IfModule>
</IfModule>

end php

cgi: 1 don’t edit between this and the “end cgi” comment below

<Directory /home/gsd/greensnakedesign.com/html>
AllowOverride All
</Directory>
<Location />
Options +ExecCGI
</Location>
ScriptAlias /cgi-bin/ /home/gsd/greensnakedesign.com/html/cgi-bin/

end cgi

SSLEngine on
SSLCACertificatePath /home/gsd/var/greensnakedesign.com/ssl
SSLCertificateKeyFile /home/gsd/var/greensnakedesign.com/ssl/greensnakedesign.com.priv.key
SSLCertificateFile /home/gsd/var/greensnakedesign.com/ssl/greensnakedesign.com.crt
SSLOptions +ExportCertData +StrictRequire
SetEnvIf User-Agent “.MSIE.” nokeepalive ssl-unclean-shutdown
<IfModule mod_interworx_settings.c>
# InterWorx adds this dummy module section to store settings
# There is no mod_interworx_settings module
# DO NOT DELETE
last_update 2015-09-18 08:40:55
iworx_controlled_ips 173.240.15.114:443
</IfModule>
</VirtualHost>

Hi Kat

Sorry, I’ve just reread my post and my SSL addition on your server will fail unless you have set for strict SSL

I’ll post an amended section when I’m back later today, which does not include strict SSL

Sorry about that

Many thanks

John

Hi Kat
Please use this for SSL to add into your vhost (again, sorry for any mistakes or errors), but thinking again, my first SSL shoud work, I think I was confused over strictrequired.
Many thanks
John
<VirtualHost 173.240.15.114:443>
SuexecUserGroup gsd gsd
DocumentRoot /home/gsd/greensnakedesign.com/html
ServerName greensnakedesign.com
ServerAlias www.greensnakedesign.com ftp.greensnakedesign.com mail.greensnakedesign.com
ServerAdmin webmaster@greensnakedesign.com

subdomain logic

RewriteEngine On
RewriteOptions inherit
RewriteCond %{HTTP_HOST} !^www.greensnakedesign.com [NC]
RewriteCond %{HTTP_HOST} !^greensnakedesign.com [NC]
RewriteCond %{HTTP_HOST} ^([A-Z0-9a-z-.]+).greensnakedesign.com [NC]
RewriteCond %{DOCUMENT_ROOT}/%1 -d
RewriteRule ^(.+) %{HTTP_HOST}/$1 [C]
RewriteRule ^([0-9A-Za-z-.]+).greensnakedesign.com/?(.)$ %{DOCUMENT_ROOT}/$1/$2 [L]
RewriteCond %{HTTP_HOST} ^www.([A-Z0-9a-z-.]+).greensnakedesign.com [NC]
RewriteCond %{DOCUMENT_ROOT}/%1 -d
RewriteRule ^(.+) %{HTTP_HOST}/$1 [C]
RewriteRule ^www.([0-9A-Za-z-.]+).greensnakedesign.com/?(.
)$ %{DOCUMENT_ROOT}/$1/$2 [L]

end subdomain logic

ErrorLog /home/gsd/var/greensnakedesign.com/logs/error.log
CustomLog /home/gsd/var/greensnakedesign.com/logs/transfer.log combined

php: default don’t edit between this and the “end php” comment below

<IfModule mod_suphp.c>
suPHP_Engine On
suPHP_UserGroup gsd gsd
AddHandler x-httpd-php .php
suPHP_AddHandler x-httpd-php .php
suPHP_ConfigPath /home/gsd/etc
</IfModule>
<IfModule !mod_suphp.c>
<IfModule mod_php5.c>
php_admin_flag engine On
</IfModule>
<IfModule mod_php4.c>
php_admin_flag engine On
</IfModule>
</IfModule>

end php

cgi: 1 don’t edit between this and the “end cgi” comment below

<Directory /home/gsd/greensnakedesign.com/html>
AllowOverride All
</Directory>
<Location />
Options +ExecCGI
</Location>
ScriptAlias /cgi-bin/ /home/gsd/greensnakedesign.com/html/cgi-bin/

end cgi

SSLEngine on
SSLHonorCipherOrder On
SSLCipherSuite !ADH:RC4:@STRENGTH:+HIGH:@STRENGTH:+MEDIUM:@STRENGTH:!LOW:!SSLv2:!EXPORT:!aNULL:!eNULL:!NULL
SSLCACertificatePath /home/gsd/var/greensnakedesign.com/ssl
SSLCertificateKeyFile /home/gsd/var/greensnakedesign.com/ssl/greensnakedesign.com.priv.key
SSLCertificateFile /home/gsd/var/greensnakedesign.com/ssl/greensnakedesign.com.crt
SSLOptions +ExportCertData +StrictRequire
SetEnvIf User-Agent “.MSIE.” nokeepalive ssl-unclean-shutdown
<IfModule mod_interworx_settings.c>
# InterWorx adds this dummy module section to store settings
# There is no mod_interworx_settings module
# DO NOT DELETE
last_update 2015-09-18 08:40:55
iworx_controlled_ips 173.240.15.114:443
</IfModule>
</VirtualHost>

Hi John,

The SSL.conf is in: /etc/httpd/conf.d

Thanks John! Your solution worked!

Hi Kat

Many thanks, glad it has resolved one issue.

Please can you try the second test

Reason for this is to make sure IW works as expected, as IW should create and add the https into the vhost file.

Appreciate if you could post if this does work or not as expected.

If it does not, I think you would be best advised to open a support ticket so IW can have a look at what has gone wrong.

Many thanks

John