{"action":"created","issue":{"url":"https://api.github.com/repos/shellinabox/shellinabox/issues/85","labels_url":"https://api.github.com/repos/shellinabox/shellinabox/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/shellinabox/shellinabox/issues/85/comments","events_url":"https://api.github.com/repos/shellinabox/shellinabox/issues/85/events","html_url":"https://github.com/shellinabox/shellinabox/issues/85","id":59645107,"number":85,"title":"SSL doesn't work on Ubuntu 10.10","user":{"login":"KLuka","id":1918763,"avatar_url":"https://avatars.githubusercontent.com/u/1918763?v=3","gravatar_id":"","url":"https://api.github.com/users/KLuka","html_url":"https://github.com/KLuka","followers_url":"https://api.github.com/users/KLuka/followers","following_url":"https://api.github.com/users/KLuka/following{/other_user}","gists_url":"https://api.github.com/users/KLuka/gists{/gist_id}","starred_url":"https://api.github.com/users/KLuka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KLuka/subscriptions","organizations_url":"https://api.github.com/users/KLuka/orgs","repos_url":"https://api.github.com/users/KLuka/repos","events_url":"https://api.github.com/users/KLuka/events{/privacy}","received_events_url":"https://api.github.com/users/KLuka/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/shellinabox/shellinabox/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/shellinabox/shellinabox/labels/imported","name":"imported","color":"FFFFFF"},{"url":"https://api.github.com/repos/shellinabox/shellinabox/labels/invalid","name":"invalid","color":"e6e6e6"},{"url":"https://api.github.com/repos/shellinabox/shellinabox/labels/Priority-Medium","name":"Priority-Medium","color":"FFFFFF"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-03T14:01:29Z","updated_at":"2015-03-03T14:01:41Z","closed_at":null,"body":"_From [victorh...@gmail.com](https://code.google.com/u/115142101575949904886/) on August 18, 2010 04:30:01_\n\nWhat steps will reproduce the problem? 1. Download shellinabox from SVN ( r212 ).\r\n2. Create package using dpkg-buildpackage, and install the package.\r\n3. Configure Nginx to proxy default site to http://localhost:4200 What is the expected output? What do you see instead? shellinabox should appear in the browser window.\r\n\r\nInstead, Firefox reports \"Unable to connect\".\r\n\r\nI added \"\"--debug\" to the command-line options in /etc/defaults/shellinabox, then found I had to remove the \"-q\" option from /etc/init.d/shellinabox as it complained they were mutually exclusive (isn't there some way of making one particular setting override the other?).\r\n\r\nAnyhow, on the detailed debug output, I get:\r\n\r\n * Starting Shell In A Box Daemon shellinabox\r\nCommand line: /usr/bin/shellinaboxd --background=/var/run/shellinaboxd.pid -c /var/lib/shellinabox -p 4200 -u shellinabox -g shellinabox --user-css Black on White:+/etc/shellinabox/options-enabled/00+Black on White.css,White On Black:-/etc/shellinabox/options-enabled/00_White On Black.css;Color Terminal:+/etc/shellinabox/options-enabled/01+Color Terminal.css,Monochrome:-/etc/shellinabox/options-enabled/01_Monochrome.css --no-beep --debug\r\n   ...done.\r\nListening on port 4200\r\nvictorhooi@DBSYDWS0284:/etc$ Accepted connection from localhost:53681\r\nHandling \"GET\" \"/\"\r\nCompressed response from 4883 to 2099\r\nlocalhost - - [19/Aug/2010:09:52:29 +1000] \"GET / HTTP/1.0\" 200 2192\r\nClosing connection to localhost:53681\r\nAccepted connection from localhost:53682\r\nHandling \"GET\" \"/styles.css\"\r\nCompressed response from 3199 to 851\r\nlocalhost - - [19/Aug/2010:09:52:29 +1000] \"GET /styles.css HTTP/1.0\" 200 982\r\nClosing connection to localhost:53682\r\nAccepted connection from localhost:53683\r\nHandling \"GET\" \"/ShellInABox.js\"\r\nCompressed response from 169881 to 38624\r\nlocalhost - - [19/Aug/2010:09:52:29 +1000] \"GET /ShellInABox.js HTTP/1.0\" 200 38739\r\nClosing connection to localhost:53683\r\n\r\nI then found that if I add \"-t\" to the commandline options in /etc/default/shellinabox, the site now works. So I'm assuming this is something to do with the SSL setup on the default Debian package?\r\n\r\nI also tried changing the Nginx config to proxy to the https site:\r\n\r\nproxy_pass https://127.0.0.1:4200/;\r\n\r\nbut still no luck there, unfortunately. What version of the product are you using? On what operating system? SVN r212 , running on Ubuntu 10.10.\r\n\r\nProxying through Nginx 0.8.49 (from https://launchpad.net/~jdub/+archive/ppa ). Please provide any additional information below.\n\n_Original issue: http://code.google.com/p/shellinabox/issues/detail?id=85_"},"comment":{"url":"https://api.github.com/repos/shellinabox/shellinabox/issues/comments/76949899","html_url":"https://github.com/shellinabox/shellinabox/issues/85#issuecomment-76949899","issue_url":"https://api.github.com/repos/shellinabox/shellinabox/issues/85","id":76949899,"user":{"login":"KLuka","id":1918763,"avatar_url":"https://avatars.githubusercontent.com/u/1918763?v=3","gravatar_id":"","url":"https://api.github.com/users/KLuka","html_url":"https://github.com/KLuka","followers_url":"https://api.github.com/users/KLuka/followers","following_url":"https://api.github.com/users/KLuka/following{/other_user}","gists_url":"https://api.github.com/users/KLuka/gists{/gist_id}","starred_url":"https://api.github.com/users/KLuka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KLuka/subscriptions","organizations_url":"https://api.github.com/users/KLuka/orgs","repos_url":"https://api.github.com/users/KLuka/repos","events_url":"https://api.github.com/users/KLuka/events{/privacy}","received_events_url":"https://api.github.com/users/KLuka/received_events","type":"User","site_admin":false},"created_at":"2015-03-03T14:01:41Z","updated_at":"2015-03-03T14:01:41Z","body":"_From [zod...@gmail.com](https://code.google.com/u/109388341641331418132/) on August 18, 2010 15:02:27_\n\nFor nginx, something like this should work:\r\n\r\nserver {\r\n  location / {\r\n    proxy_pass http://localhost:4200;\r\n  }\r\n}\r\n\r\nserver {\r\n  listen 443;\r\n  ssl on;\r\n  ssl_certificate /var/lib/shellinabox/certificate.pem;\r\n  ssl_certificate_key /var/lib/shellinabox/certificate.pem;\r\n  location / {\r\n    proxy_pass http://localhost:4200;\r\n  }\r\n}\r\n\r\n\r\nIf you decide to run the service at a different relative URL, you have to edit 1) the \"location\" in the nginx configuration file, and 2) pass a suitable \"-s/...:LOGIN\" option to shellinaboxd. On Debian, you can probably do the latter by editing /etc/default/shellinabox.\r\n\r\nIn general, when using a reverse proxy, you should probably also set the --localhost-only option.\r\n\r\nYou do _not_ want to give the --disable-ssl option. While you do not want ShellInABox to do the SSL encryption, you still want it to automatically change URLs to the https URL."}}