Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

Cannot connect to www. #167

Closed
RabbitMC opened this issue Jan 31, 2014 · 5 comments
Closed

Cannot connect to www. #167

RabbitMC opened this issue Jan 31, 2014 · 5 comments

Comments

@RabbitMC
Copy link

Hi,
I'm using first time HockeyKIT on my own server.
I have done everything like in the wiki. The Webpage is running, the icon of the app is visible and two button: "Install Profile" and "Install Application" are visible.
Install Profile works but when I click on Install Application, an Alterview pops up and say "Cannot connect to www.mypage.com.

I have read about that I have to enable mod_rewrite on my apache server.

When I type "sudo apachectl -t -D DUMP_MODULES" I get "rewrite_module (shared)".

So what I have to do to install the app on my iPad?

My .htacess file looks

# REWRITE RULES
 <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .* /ota/index.php [L]
    RewriteRule api/.*  /index.php [L]
    RewriteRule ^stats/$ stats/index.php [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* index.php [L]

 </IfModule>

# MIME TYPES
 <IfModule mod_mime.c>
    AddType application/octet-stream .ipa
    AddType application/vnd.android.package-archive .apk
    AddType text/xml .plist
 </IfModule> 

can anyone help me?

@DerAndereAndi
Copy link
Contributor

The rewrite rule looks wrong to me:

RewriteRule .* /ota/index.php [L]
RewriteRule api/.*  /index.php [L]
RewriteRule ^stats/$ stats/index.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* index.php [L]

So the top three statements are added by you, and the first one is even duplicate to the last one. In addition you moved everything into an /ota subdirectory, but only added a rewrite rule for the first statement which is then overwritten at the bottom again?
Also, if the link to the app fails, this usually hints that the /api/ URL path is not correct. And looking at your rewrite rules, it looks wrong.

  1. What is your directory structure?
  2. In which directory is this .htaccess file
  3. To which directory does the root URL point?
  4. Which iOS Version are you testing? (7.1 requires HTTPS !)

@RabbitMC
Copy link
Author

RabbitMC commented Feb 5, 2014

"What is your directory structure?"
/var/www/ota
So when I got to: my page.com/ota I get the overview of Apps (with icon and the two Buttons)

"In which directory is this .htaccess file?"
/var/www/ota

"To which directory does the root URL point?"
I'm not sure if I understand the question, but my root URL is pointing to the /var/www/index.html

"Which iOS Version are you testing?"
iOS 7.0.3 on iPad

I have also a ota/api/2/apps//AppProfile.mobileprovisioning

screen-shot-2014-02-05-at-16 21 22

@RabbitMC
Copy link
Author

RabbitMC commented Jul 7, 2014

I have tried to install HockeyKit again on my server.

Now I need to test apps on iOS 7.1.
First I get a error because my site was not available over https.

Now, I have https with a self-signed certificate.

I'm calling https://www.mydomain.tld/hockeyKit/

The App Icon, App Name etc are displayed. Also I have two Buttons… "Install Profile" and "Install Application"

Installing Profile over iOS Safari works perfect.
Installing App over iOS Safari doesn't work. I get always the "Cannot connect to..." message.

I have a Apache2 Server running on ubuntu, mod_rewrite is enabled and AllowOverride All is active for /var/www . hockeyKit is installed in /var/www/hockeyKit.

I don't understand where my fault ist :/
I have copied the master repo files.

the .htaccess file in /var/www/hockeyKit has the following content.

REWRITE RULES

RewriteEngine On
RewriteRule ^stats/$ stats/index.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* index.php [L]

MIME TYPES

AddType application/octet-stream .ipa AddType application/vnd.android.package-archive .apk AddType text/xml .plist

@FabianFrank
Copy link
Contributor

A self-signed certificate won't work unless you import the issuing CA as a trusted CA in your phone.

@RabbitMC
Copy link
Author

RabbitMC commented Jul 7, 2014

I have under Settings->General->Profile->www.mydomain.tld at "configuration profiles"
When I clicked on it, there is a "trusted" mark. Is this ok?

@RabbitMC RabbitMC closed this as completed Jul 9, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants