{"id":4112,"date":"2013-09-11T05:04:26","date_gmt":"2013-09-10T19:04:26","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=4112"},"modified":"2018-07-09T17:40:32","modified_gmt":"2018-07-09T07:40:32","slug":"cassini-webserver-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/cassini-webserver-primer-tutorial\/","title":{"rendered":"Cassini++ WebServer Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Windows\/WebServer\/Cassini\/\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Cassini++ WebServer Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Windows\/WebServer\/Cassini\/Cassini_WebServer_Primer-10of.jpg\" title=\"Cassini++ WebServer Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Cassini++ WebServer Primer Tutorial<\/p><\/div>\n<p>Web Servers can be hard to get your head around, but not if you have three heads.   Being as most of us don&#8217;t have three heads maybe this tutorial may be of interest to you.    Here we go back to, arguably, the simplest Web Server that you wouldn&#8217;t write yourself (or install yourself, despite the fact that you do install it (though daresay it would just work by plonking it &#8230; ah, the days of &#8220;plonking&#8221; (<a target=_blank title='Windows registry information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Windows_Registry'>are gone<\/a>))).   It is called Cassini, though nowadays it is known as Cassini++ and the ++ is a red-rag-to-a-bull to say let&#8217;s look at more after we have that look at Cassini and look at some of the myriad of Web Server options to give a feel of what is out there, though will admit that the mobile app world has made this a much bigger &#8220;world&#8221; than this tutorial will present, so you should go off and do more research, if it interests you.<\/p>\n<p>The hardest concept with Web Servers, and using Cassini illustrates this well is &#8220;What the heck is http:\/\/localhost\/ ?&#8221;  &#8220;And what is HTTP:\/\/127.0.0.1\/ ?&#8221;   Well, the answer is, they are the same, as you can see by comparing picture above with the last one of slideshow (of tutorial).   So have a read here about <a target=_blank title='localhost information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Localhost'>localhost<\/a>.<\/p>\n<p>Another concept with Web Servers, and using Cassini illustrates this well is &#8220;What the heck is the :80 in http:\/\/localhost:80\/ ?&#8221;  &#8220;And what is the :80 in HTTP:\/\/127.0.0.1:80\/ ?&#8221;   Well, the answer is, the 80 means to use <a target=_blank title='port as explained by Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Port_%28computer_networking%29'>port<\/a> 80.  If there is no : in a public URL that you use it is probably using (default) port 80 for http usage.<\/p>\n<p>Another hard concept with Web Servers, and using Cassini illustrates this well is &#8220;What the heck does http:\/\/localhost\/ equate to as a place on the Web Server Host computer?&#8221;  &#8220;And what does HTTP:\/\/127.0.0.1\/ equate to as a place on the Web Server Host computer?&#8221;   Well, the answer is, this is a configuration aspect of the Web Server you use.   For instance MAMP uses \/Applications\/MAMP\/htdocs\/ as a default on a Mac laptop and EasyPHP (like WAMP) uses &#8220;c:\\Program Files\\EasyPHP-12.1\\www\\&#8221; (in the case for my Windows laptop) as a default on a Windows PC\/laptop.   So if you are forced to use a Web Server unfamiliar to you, and you get the chance to understand everything very quickly via the advice of an expert, ask them where the default Document Root directory is located for your particular Web Server.   If you are not lucky enough to get this advice, for Apache PHP hosting there will be a file called httpd.conf which will contain a reference for its Document Root directory, which will answer this question for you &#8230; but where is httpd.conf ?   Ask the chicken, because the egg gives you a dumb look.   For instance, for Apache for Mac OSX of list below it is \/private\/etc\/apache2\/httpd.conf and it is information you often get in product READMEs.)   The rest is made reasonably straightforward (except perhaps file and directory permissions and <a target=_blank title=.htaccess information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Htaccess'>.htaccess<\/a> and <a target=_blank title='robot.txt information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Robots_exclusion_standard'>robot.txt<\/a>, and with <a target=_blank title=\"IIS information from Wikipedia\" href=\"http:\/\/en.wikipedia.org\/wiki\/Internet_Information_Services\">IIS<\/a> things like image extension rules and permissions) once you have this basic information.<\/p>\n<p>So let&#8217;s put together a list of (some of the) Web Server types that might be of interest below:<\/p>\n<ul>\n<li><a target=_blank title='Casini++ home page' href='http:\/\/cassinipp.codeplex.com\/'>Cassini<\/a> on Windows http:\/\/localhost:80\/ &#8230; <a target=_blank title='tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=4112'>tutorial<\/a><\/li>\n<li>Apache for MAMP Framework on Mac OSX http:\/\/localhost:8888\/ &#8230; <a target=_blank title='tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=933'>tutorial<\/a><\/li>\n<li>Apache for EasyPHP (WAMP) Framework on Windows http:\/\/localhost:80\/ &#8230; <a target=_blank title='tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=1078'>tutorial<\/a><\/li>\n<li>Apache for CentOS on Linux http:\/\/localhost:80\/ &#8230; <a target=_blank title='tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=3491'>tutorial<\/a><\/li>\n<li>Apache for Zend Framework on Linux http:\/\/localhost:80\/ &#8230; <a target=_blank title='example website that uses Zend web hosting' href='http:\/\/www.ozemail.com.au\/~mkuulma\/'>example website using Zend hosting<\/a><\/li>\n<li>Apache for Delphi\/Pascal http:\/\/localhost:80\/ &#8230; <a target=_blank title='tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=2008'>tutorial<\/a><\/li>\n<li>Apache Tomcat for Eclipse\/Java http:\/\/localhost:80\/ &#8230; <a target=_blank title='tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=2008'>tutorial<\/a><\/li>\n<li>(Write your own) Go Web Server http:\/\/localhost:8080\/ &#8230; <a target=_blank title='tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=3969'>tutorial<\/a><\/li>\n<li>Apache Tomcat web server for Liferay Java Web Portal Primer Tutorial http:\/\/localhost:8080\/ &#8230; <a target=_blank title='tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=8290'>tutorial<\/a><\/li>\n<li>(Write your own) Python Web Server http:\/\/localhost:2112\/ &#8230; <a target=_blank title='tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=7056'>tutorial<\/a><\/li>\n<li>NetBeans GlassFish Web Server http:\/\/localhost:8080\/ or http:\/\/localhost:8383\/ &#8230; <a target=_blank title='tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=4622'>tutorial<\/a> or <a target=_blank title='tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=4948'>tutorial<\/a> or (for Java EE RESTful Web Service) <a target=_blank title='tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=13345'>tutorial<\/a><\/li>\n<li>Jenkins Web Server http:\/\/localhost:9190\/ (living with Glassfish web server on <strike>http:\/\/localhost:8080\/<\/strike> http:\/\/localhost:9190\/) <a target=_blank title='Jenkins and NetBeans Maven Project Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/jenkins-and-netbeans-maven-project-primer-tutorial'>tutorial<\/a><\/li>\n<li>Message Board Web Server http:\/\/localhost:9190\/ (living with Glassfish web server on <strike>http:\/\/localhost:8080\/<\/strike> http:\/\/localhost:9190\/) <a target=_blank title='NetBeans Java RESTful Message Board Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/netbeans-java-restful-message-board-primer-tutorial'>tutorial<\/a><\/li>\n<li>Jenkins Deployed (via Ansible) Web Server http:\/\/localhost:9280 &#8230; <a target=_blank title='tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/ansible-and-vagrant-deploys-git-and-jenkins-primer-tutorial\/'>tutorial<\/a><\/li>\n<li>NetBeans Apache Tomcat Web Server http:\/\/localhost:8080\/ &#8230; <a target=_blank title='tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5959'>tutorial<\/a><\/li>\n<li>NetBeans Backbone.js Web Server (via Google Chrome NetBeans Connector) http:\/\/localhost:8383\/ &#8230; <a target=_blank title='tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=13476'>tutorial<\/a><\/li>\n<li>Visual Studio ASP.Net Wcf Web Service Website as you debug it on Windows http:\/\/localhost:1799\/[Service.svc] &#8230; <a target=_blank title='tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=6504'>tutorial<\/a><\/li>\n<li>Visual Studio ASP.Net Website as you debug it on Windows http:\/\/localhost:[isAssignedAtTime]\/ &#8230; <a target=_blank title='tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=4095'>tutorial<\/a><\/li>\n<li><a target=_blank title='IIS by Microsoft information here' href='http:\/\/www.iis.net\/'>IIS<\/a> for ASP.Net as you deploy it on Windows http:\/\/localhost:80\/<\/li>\n<li>Apache for Mac OSX http:\/\/localhost:80\/ &#8230; <a target=_blank title='tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=4066'>tutorial<\/a><\/li>\n<li>Django Python http:\/\/localhost:8080\/ &#8230; <a target=_blank title='tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=9830'>tutorial<\/a><\/li>\n<li>Ruby on Rails http:\/\/localhost:3000\/ &#8230; <a target=_blank title='tutorial'  href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=1911'>tutorial<\/a><\/li>\n<li>Node.js and Node http:\/\/localhost:3000\/ &#8230; <a target=_blank title='tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/node-js-and-node-local-web-server-primer-tutorial\/'>tutorial<\/a><\/li>\n<li>Socket.IO and Node.js http:\/\/localhost:3000\/ &#8230; <a target=_blank title='tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/socket.io-node.js-chat-application-primer-tutorial\/'>tutorial<\/a><\/li>\n<li>React Javascript Library and Node http:\/\/localhost:5000\/ &#8230; <a id='reacta' target=_blank title='tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/react-javascript-library-on-node-and-visual-studio-code-hello-world-tutorial'>tutorial<\/a> (and then onto &#8220;local network&#8221; sharing to HTTP:\/\/192.168.0.13:5000)<\/li>\n<li>Mojito via node.js http:\/\/localhost:8666\/ &#8230; <a target=_blank title='tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=6208'>tutorial<\/a><\/li>\n<li>Ansible\/Vagrant\/VirtualBox http:\/\/localhost:8080\/ &#8230; <a target=_blank title='tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=19294'>tutorial<\/a><\/li>\n<li>.NET Core and C# http:\/\/localhost:50000\/ &#8230; <a target=_blank title='.NET Core' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/visual-studio-code-on-mac-os-x-for-net-core-and-C-tutorial\/'>tutorial<\/a><\/li>\n<li>Cocos2D Framework Cocos Creator IDE http:\/\/localhost:7456\/ &#8230; <a target=_blank title='Cocos2d Mac Game Hello World Cocos Creator Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/cocos2d-mac-game-hello-world-cocos-creator-tutorial\/'>tutorial<\/a><\/li>\n<li>MeteorJS Framework http:\/\/localhost:3000\/ &#8230; <a target=_blank title='MeteorJS Framework' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=39334'>tutorial<\/a><\/li>\n<\/ul>\n<p>In conclusion you might say that, sure, we can remove the :80 as the default port but how come we are still left with http:\/\/localhost\/ when we know the website is accessed via http:\/\/blah.com.zz\/ (for example).   The way localhost is replaced by blah.com.zz is what public web hosting is about and a study of the World Wide Web and would recommend you have a revisit of the links of <a target=_blank title='tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=3491'>Web Server Primer Tutorial<\/a>, just as a starting point, regarding this.<\/p>\n<table>\n<tr>\n<td>\n<p>Happy serving!<\/p>\n<\/td>\n<td><iframe loading=\"lazy\" width=\"252\" height=\"189\" src=\"\/\/www.youtube.com\/embed\/8rXk8TDtu1M\" frameborder=\"0\" allowfullscreen><\/iframe><\/td>\n<\/tr>\n<\/table>\n<p><strong>Did you know?<\/strong><\/p>\n<p>The file naming for ASP.Net filenames has that little bit of lack of precision compared to lots of other web hosting because, going back to the original DOS days (Windows) filenames could be uppercase\/lowercase and still refer to the same file.   This is not the case with Unix or Linux (and so, also, Mac OSX).<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d4112' onclick='var dv=document.getElementById(\"d4112\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?s=localhost#content\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d4112' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Web Servers can be hard to get your head around, but not if you have three heads. Being as most of us don&#8217;t have three heads maybe this tutorial may be of interest to you. Here we go back to, &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/cassini-webserver-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,18,25,29,33,37],"tags":[190,327,1859,840,1319,1378,1411,1435],"class_list":["post-4112","post","type-post","status-publish","format-standard","hentry","category-elearning","category-hardware","category-networking","category-operating-system","category-software","category-tutorials","tag-cassini","tag-did-you-know","tag-node","tag-node-js","tag-tutorial","tag-virtualbox","tag-web-server","tag-windows"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/4112"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=4112"}],"version-history":[{"count":22,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/4112\/revisions"}],"predecessor-version":[{"id":39339,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/4112\/revisions\/39339"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=4112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=4112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=4112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}