<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.24pin.tech/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lchristopherson</id>
	<title>24PinTech Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.24pin.tech/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lchristopherson"/>
	<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/view/Special:Contributions/Lchristopherson"/>
	<updated>2026-05-08T13:16:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Bradley_Chamberlain&amp;diff=2239</id>
		<title>Bradley Chamberlain</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Bradley_Chamberlain&amp;diff=2239"/>
		<updated>2023-06-16T20:30:37Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: :)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About ==&lt;br /&gt;
[[File:Bradley1.jpg|thumb]]&lt;br /&gt;
The god of creation and ending. . Bradley Chamberlain is the man who has founded 24PinTechnologies with his own bare two hands, and single-handedly became a legend among former gods, he has dethroned every god known to man and has become something inevitable. Bradley Chamberlain.&lt;br /&gt;
== Origin ==&lt;br /&gt;
It all began on November 1st, 1967. The man who will destroy anything and everything was born. Not much is known about Bradley's childhood life, but many speculate that Bradley Chamberlain lead a normal childhood life. In Bradley's young adult life, he engaged in the playing of a sport. That sports name would happen to be foosball... and it would change his life forever.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Edit:  Bradford™️ has been found prone to leaving important classified information in his pants from yesterday.  Stay aware!&lt;br /&gt;
== Foosball era (appx. 1986-1994) ==&lt;br /&gt;
Bradley Chamberlain had taken a keen interest to Foosball. This is the first thing in Bradley's life that makes since to him, and allows him to truly be ''free''. One occasion during these Foosball days, appx. 1989, Bradley had come in contact with a very import man in the tech industry, a ''god'' named Scott Manchester. This Deity, ''Scott Manchester'' had challenged everyone in the establishment to a duel in Foosball. Scott had claimed that there was no one in the world who could dethrone Scott as the Foosball champion, and the ''Digital Deity™''. Scott had caused a riot. &amp;quot;''hmm, what's this?''&amp;quot; Bradley curiously denounced. Bradley took a look around to see everyone going crazy over something, but what? People stared cheering, &amp;quot;'''Di-gi-tal De-i-ty, Di-gi-tal De-i-ty'''&amp;quot;. This chant piqued Bradley's interest. Bradley located the source of the chanting, the stage. Bradley walked up to the stage and challenged Scott Manchester to a Foosball duel to the death.&lt;br /&gt;
=== The rise of a legend ===&lt;br /&gt;
Scott noticed Bradley among all of the other smelly nerds, and silenced the crowd. &amp;quot;'''''So you wish to duel me? To the death?'''''&amp;quot; Scott responded. Bradley didn't reply. This made Scott furious. Bradley simply watched. As the crowd grew louder, Scott scoffed. Bradley finally made his way up to the ring with Scott Manchester waiting for him. Scott smirked, and began to speak, &amp;quot;WELC-&amp;quot;! Immediately Bradley teleported behind Scott Manchester with a blank face staring down. &amp;quot;Are you sure you'd like to finish that?&amp;quot; Bradley exclaimed.&lt;br /&gt;
=== The tale to be told for ages ===&lt;br /&gt;
Scott gulped. Without talking he started setting up the foosball table. Bradley walked to his side very slowly. When Bradley arrived to the table, the referee stated the stakes of this battle, &amp;quot;'''''You are betting your pride, titles, and lives. Do you both consent.'''''&amp;quot; Both of them nodded. Each of them gripped their handles, Scott grabbing a defensive and offensive handle, while Bradley grabbed two offensive handles. Scott smirked and thought, &amp;quot;''He's so stupid! Two offensive???''&amp;quot; Bradley said out loud, &amp;quot;'''Don't think so soon Scotty.'''&amp;quot; The game went on for approximately 4 minutes and 23 seconds. Bradley swept the floor with Scott. The crowd was in awe. As the last point was given to Bradley, Scott began begging for his life, and to be shown mercy. Bradley complied. Bradley would come to be known as one of the most merciful beings in existence. This battle is what allowed Bradley to gain his title as the '''Digital Deity'''.&lt;br /&gt;
== Beginning of the End (appx. 1997-2009) ==&lt;br /&gt;
This is a very unknown part of Bradley's life, as he does not remember this era very well and it hasn't been documented well. What is known about this time period, is that Bradley had began his reign as the '''Digital Deity'''. Bradley would pillage any town if someone gave him the slightest attitude. The theory goes something along the lines of, &amp;quot;Bradley found a person who made him happy. This so called person didn't like the pointless violence that Bradley partook in, and therefore told him that if he didn't end the pointless violence and destruction, they would leave forever. This person eventually showed Bradley the meaning of compassion.&amp;quot; Bradley had finally learned '''''some''''' compassion. Instead of directing his anger at random civilians and towns, Bradley took it out on people who deserved it. Bradley gained his title as &amp;quot;'''The Merciless Bounty Hunter'''&amp;quot; through the only time in this era that has been documented.&lt;br /&gt;
=== The Merciless Bounty Hunter ===&lt;br /&gt;
With Bradley's newfound compassion, he decided to use it for good. Bradley took to the streets, looking for people who have a price to pay. At first Bradley had begun to destroy petty criminals, with an axe that he had in his garage, but learned of the big time criminals who had a bounty on their heads. Bradley had set out to find his first victim, whomst was very difficult to locate. One Bradley did locate this first criminal however, he was slowly put to rest. ''The Axe&amp;lt;sup&amp;gt;TM&amp;lt;/sup&amp;gt;'' wasn't enough. Although Bradley put up a fight, he was pounced on by this criminal. This brought Bradley back to the drawing board. Bradley had never felt so embarrassed in his life, so therefore he had decided to curate a brand new weapon. The likes of which no one has ever seen before. Bradley spent weeks in the garage designing and perfecting this unholy weapon. Bradley had taken multiple ethernet cords, and combined them all together to create a whip of sorts. Bradley decided to name this the ''EtherWhip&amp;lt;sup&amp;gt;TM&amp;lt;/sup&amp;gt;''. Bradley did not need practice with this new weapon, as it was completely natural to him. This was a part of Bradley already. Bradley immediately set forth to find the same criminal, and when he did... let's just say that Bradley obtained a nice amount of money. This newfound way to bring out his violence and aggression mixed with the fact that he gets paid to do this pushed Bradley to become a name to fear. Everyone who obtained a bounty feared for their very lives, as Bradley would always find them, and finish them swiftly.&lt;br /&gt;
== The founding of 24PinTechnologies (appx. 2010-present) ==&lt;br /&gt;
After several years of gaining money through bounties, Bradley become quite tired, though Bradley's thirst for excitement was not quite quenched yet. Bradley had always thought that his dream would be to start a business where he can truly be himself, and with his compassion he had acquired, he wanted to help others be themselves as well. Bradley used his title as the '''Digital Deity''' to start a nonprofit IT business through the local school in his town. The business became a booming success, with people finding their places through his program. Bradley had also benefited from this as he could still &amp;quot;punish&amp;quot; the bad kids, RIP, and gain passive income, all while being who he truly wants to be. Bradley had finally found true happiness.&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Parsoid_and_VisualEditor&amp;diff=1910</id>
		<title>Parsoid and VisualEditor</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Parsoid_and_VisualEditor&amp;diff=1910"/>
		<updated>2022-08-08T19:30:15Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
[[File:Parsoid word logo.svg.png|thumb]]&lt;br /&gt;
VisualEditor is the plugin that allows MediaWiki to edit pages through the web format. It makes creating pages a seamless process with copy and paste functionality from Google Docs or anywhere else with formatting. VisualEditor runs through a service called Parsoid though. Parsoid takes the text inputted on the VisualEditor, and it parses it into wikitext.&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
To setup Parsoid with VisualEditor you have to configure two files.&lt;br /&gt;
&lt;br /&gt;
=== LocalSettings.php ===&lt;br /&gt;
LocalSettings.php is located in the root directory of your website. In this file you must find where the extensions are loaded. If VisualEditor is not already loaded, you must load it manually. Add these following lines to the plugins. Our LocalSettings.php is located at &amp;lt;code&amp;gt;/var/www/wiki.24pin.tech/LocalSettings.php&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wfLoadExtension( 'VisualEditor' );&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wfLoadExtension( 'Parsoid', __DIR__, '/vendor/wikimedia/parsoid/extension.json' );&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Block Config ===&lt;br /&gt;
You will have to add the restbase server to your server block for this to work. Our server block is located at &amp;lt;code&amp;gt;/etc/nginx/sites-available/wiki.24pin.tech&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;location /rest.php/ {&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;try_files $uri $uri/ /rest.php?$query_string;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These lines are just another location block that you will add at the end of your server block.&lt;br /&gt;
&lt;br /&gt;
=== If that doesn't work ===&lt;br /&gt;
There could be a multitude of reasons that Parsoid does not work, so the best way to figure it out is researching. The only other fix I could recommend, is adding this to the end of your LocalSettings.php file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$wgDefaultUserOptions['visualeditor-enable'] = 1;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$wgDefaultUserOptions['visualeditor-editor'] = &amp;quot;visualeditor&amp;quot;;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$wgHiddenPrefs[] = 'visualeditor-enable';&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is it... It's not as complicated as we thought.&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=MediaWiki&amp;diff=1909</id>
		<title>MediaWiki</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=MediaWiki&amp;diff=1909"/>
		<updated>2022-08-08T19:27:49Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
[[File:MediaWiki-2020-logo.svg.png|thumb|116x116px]]&lt;br /&gt;
Mediawiki is the software that our wiki runs on. Mediawiki is ran on our LEMP stack and allows for &amp;quot;wikipedia&amp;quot; type pages to be made securely. Installing a wiki is a very simple process, so pay attention...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Before you begin, make sure that you have a server block set up for the wiki.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki&lt;br /&gt;
&lt;br /&gt;
https://www.mediawiki.org/wiki/Manual:Config_script&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
To begin the installation for MediaWiki, you need to have a working webserver, in which we are running a LEMP stack. &lt;br /&gt;
&lt;br /&gt;
* Visit [https://mediawiki.org/wiki/Download MediaWiki's Download website] and download the new .tar.gz version&lt;br /&gt;
* [[PuTTY]] the file into the webserver.&lt;br /&gt;
* Navigate to the root directory of MediaWiki ... ex. &amp;lt;code&amp;gt;/var/www/wiki.24pin.tech&amp;lt;/code&amp;gt;&lt;br /&gt;
* Move zip to the root directory of MediaWiki using &amp;lt;code&amp;gt;sudo mv ./mediawiki-install-zip /var/www/wiki-install-directory&amp;lt;/code&amp;gt;&lt;br /&gt;
* Run &amp;lt;code&amp;gt;sudo tar -xzvf ./mediawiki-install-zip&amp;lt;/code&amp;gt; to unzip it.&lt;br /&gt;
* Best practice is to name the install folder &amp;quot;w&amp;quot;. Do this by running &amp;lt;code&amp;gt;sudo mv ./mediawiki-install ./new-name&amp;lt;/code&amp;gt;&lt;br /&gt;
* If you decide to move all files to the root, run &amp;lt;code&amp;gt;sudo mv ./mediawiki-install/* ./&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a database for the wiki ===&lt;br /&gt;
The wiki needs specific parameters for the database to correctly function. Log into mysql by running &amp;lt;code&amp;gt;sudo mysql -u root -p&amp;lt;/code&amp;gt;. Once you log in you will run the following commands with your settings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CREATE DATABASE db_name;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CREATE USER 'wikiuser'@'localhost' IDENTIFIED BY 'db_password';&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GRANT ALL PRIVILEGES ON db_name.* TO 'wikiuser'@'localhost' WITH GRANT OPTION;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will successfully create the database and database user for your wiki.&lt;br /&gt;
&lt;br /&gt;
=== Install the wiki ===&lt;br /&gt;
&lt;br /&gt;
To run the installation script, you must visit your wiki domain/mw-config. For example: &amp;lt;code&amp;gt;https://wiki.domain.com/mw-config&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;https://domain.com/wiki/mw-config&amp;lt;/code&amp;gt;. You will run through the installation with the settings that you have set up previously, such as the database user and database name. Once the setup is complete, you will receive a download for a file called LocalSettings.php. You must [[PuTTY]] this into the server, as you did with the install zip. Once completed, this will go directly to the wiki's root directory.&lt;br /&gt;
&lt;br /&gt;
The wiki should now be setup. For Parsoid and VisualEditor setup, see: [[Parsoid and VisualEditor]].&lt;br /&gt;
&lt;br /&gt;
== Special Usages ==&lt;br /&gt;
The wiki is now set up and may be used. There are two key things I'd like to iterate here. You can find most special settings, like creating accounts in the [https://wiki.24pin.tech/view/Special:SpecialPages Special Pages] tab.&lt;br /&gt;
&lt;br /&gt;
The second thing is that the sidebar is editable. You may edit it by clicking this link. &lt;br /&gt;
https://wiki.24pin.tech/edit/MediaWiki:Sidebar&lt;br /&gt;
&lt;br /&gt;
-Luke Christopherson&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Parsoid_and_VisualEditor&amp;diff=1907</id>
		<title>Parsoid and VisualEditor</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Parsoid_and_VisualEditor&amp;diff=1907"/>
		<updated>2022-08-08T18:46:59Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
[[File:Parsoid word logo.svg.png|thumb]]&lt;br /&gt;
VisualEditor is the plugin that allows MediaWiki to edit pages through the web format. It makes creating pages a seamless process with copy and paste functionality from Google Docs or anywhere else with formatting. VisualEditor runs through a service called Parsoid though. Parsoid takes the text inputted on the VisualEditor, and it parses it into wikitext.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
To setup Parsoid with VisualEditor you have to configure two files.&lt;br /&gt;
&lt;br /&gt;
=== LocalSettings.php ===&lt;br /&gt;
LocalSettings.php is located in the root directory of your website. In this file you must find where the extensions are loaded. If VisualEditor is not already loaded, you must load it manually. Add these following lines to the plugins.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wfLoadExtension( 'VisualEditor' );&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wfLoadExtension( 'Parsoid', __DIR__, '/vendor/wikimedia/parsoid/extension.json' );&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Block Config ===&lt;br /&gt;
You will have to add the rest base server to your server block for this to work.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;location /rest.php/ {&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;try_files $uri $uri/ /rest.php?$query_string;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== If that doesn't work ===&lt;br /&gt;
There could be a multitude of reasons that Parsoid does not work, so the best way to figure it out is researching. The only other fix I could recommend, is adding this to the end of your LocalSettings.php file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$wgDefaultUserOptions['visualeditor-enable'] = 1;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$wgDefaultUserOptions['visualeditor-editor'] = &amp;quot;visualeditor&amp;quot;;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$wgHiddenPrefs[] = 'visualeditor-enable';&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is it... It's not as complicated as we thought.&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=File:Parsoid_word_logo.svg.png&amp;diff=1906</id>
		<title>File:Parsoid word logo.svg.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=File:Parsoid_word_logo.svg.png&amp;diff=1906"/>
		<updated>2022-08-08T18:07:44Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;jfbdksljhag&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=PuTTY&amp;diff=1905</id>
		<title>PuTTY</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=PuTTY&amp;diff=1905"/>
		<updated>2022-08-08T18:02:16Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
[[File:Putty img.jpg|thumb|93x93px]]&lt;br /&gt;
PuTTY is a very useful program that allows you to communicate with outside devices through SSH. Putty is mainly used for remoting into machines outside of your network. You can download it [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html here].&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
https://cs.hofstra.edu/docs/pages/guides/putty_setup.html&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Remote into other System ===&lt;br /&gt;
Open the PuTTY program. Once it is open you will enter the IP address for the system you are trying to access in the Host Name box. Select the connection type as SSH, and use port 22. Press open. You will have to authenticate, and then you will be in.&lt;br /&gt;
&lt;br /&gt;
=== Send file to another System ===&lt;br /&gt;
To send a file to another system you will open a new CMD window and navigate to the PuTTY install directory. ''My command...'' &amp;lt;code&amp;gt;cd C:\Program Files\PuTTY&amp;lt;/code&amp;gt;. Once you have successfully navigated to the installation directory you will enter the command to send a file. &amp;lt;code&amp;gt;pscp.exe &amp;lt;LocalFilePath&amp;gt; &amp;lt;user&amp;gt;@&amp;lt;RemoteHost&amp;gt;:&amp;lt;RemoteDirectory&amp;gt;&amp;lt;/code&amp;gt;. You will once again have to authenticate.&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=MediaWiki&amp;diff=1904</id>
		<title>MediaWiki</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=MediaWiki&amp;diff=1904"/>
		<updated>2022-08-08T17:49:58Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
[[File:MediaWiki-2020-logo.svg.png|thumb|116x116px]]&lt;br /&gt;
Mediawiki is the software that our wiki runs on. Mediawiki is ran on our LEMP stack and allows for &amp;quot;wikipedia&amp;quot; type pages to be made securely. Installing a wiki is a very simple process, so pay attention...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Before you begin, make sure that you have a server block set up for the wiki.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki&lt;br /&gt;
&lt;br /&gt;
https://www.mediawiki.org/wiki/Manual:Config_script&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
To begin the installation for MediaWiki, you need to have a working webserver, in which we are running a LEMP stack. You will visit [https://mediawiki.org/wiki/Download MediaWiki's Download website] to download the newest version of MediaWiki in .tar.gz format. Once you have the .tar.gz file, you must PuTTY the file into the webserver. Now you have to unzip the file into the working wiki directory. Move the zip into the root of the server block by running, &amp;lt;code&amp;gt;sudo mv ./mediawiki-install-zip /var/www/wiki-install-directory&amp;lt;/code&amp;gt;. Once you have moved the zip into the folder, you need to unzip it. Do so by running &amp;lt;code&amp;gt;sudo tar -xzvf ./mediawiki-install-zip&amp;lt;/code&amp;gt;. The best practice is to use a folder named &amp;quot;w&amp;quot;, for the wiki files, though we used the root directory. To change the directory's name, you will run &amp;lt;code&amp;gt;sudo mv ./mediawiki-install ./new-name&amp;lt;/code&amp;gt;. If you are moving all of the contents into the root website directory you will run, &amp;lt;code&amp;gt;sudo mv ./mediawiki-install/* ./&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Create a database for the wiki ===&lt;br /&gt;
The wiki needs specific parameters for the database to correctly function. Log into mysql by running &amp;lt;code&amp;gt;sudo mysql -u root -p&amp;lt;/code&amp;gt;. Once you log in you will run the following commands with your settings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CREATE DATABASE db_name;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CREATE USER 'wikiuser'@'localhost' IDENTIFIED BY 'db_password';&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GRANT ALL PRIVILEGES ON db_name.* TO 'wikiuser'@'localhost' WITH GRANT OPTION;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will successfully create the database and database user for your wiki.&lt;br /&gt;
&lt;br /&gt;
=== Install the wiki ===&lt;br /&gt;
&lt;br /&gt;
To run the installation script, you must visit your wiki domain/mw-config. For example: &amp;lt;code&amp;gt;https://wiki.domain.com/mw-config&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;https://domain.com/wiki/mw-config&amp;lt;/code&amp;gt;. You will run through the installation with the settings that you have set up previously, such as the database user and database name. Once the setup is complete, you will receive a download for a file called LocalSettings.php. You must [[PuTTY]] this into the server, as you did with the install zip. Once completed, this will go directly to the wiki's root directory.&lt;br /&gt;
&lt;br /&gt;
The wiki should now be setup. For Parsoid and VisualEditor setup, see: [[Parsoid and VisualEditor]].&lt;br /&gt;
&lt;br /&gt;
== Special Usages ==&lt;br /&gt;
The wiki is now set up and may be used. There are two key things I'd like to iterate here. You can find most special settings, like creating accounts in the [https://wiki.24pin.tech/view/Special:SpecialPages Special Pages] tab.&lt;br /&gt;
&lt;br /&gt;
The second thing is that the sidebar is editable. You may edit it by clicking this link. &lt;br /&gt;
https://wiki.24pin.tech/edit/MediaWiki:Sidebar&lt;br /&gt;
&lt;br /&gt;
-Luke Christopherson&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=MediaWiki&amp;diff=1902</id>
		<title>MediaWiki</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=MediaWiki&amp;diff=1902"/>
		<updated>2022-08-08T17:38:35Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
[[File:MediaWiki-2020-logo.svg.png|thumb|116x116px]]&lt;br /&gt;
Mediawiki is the software that our wiki runs on. Mediawiki is ran on our LEMP stack and allows for &amp;quot;wikipedia&amp;quot; type pages to be made securely. Installing a wiki is a very simple process, so pay attention...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Before you begin, make sure that you have a server block set up for the wiki.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki&lt;br /&gt;
&lt;br /&gt;
https://www.mediawiki.org/wiki/Manual:Config_script&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
To begin the installation for MediaWiki, you need to have a working webserver, in which we are running a LEMP stack. You will visit [https://mediawiki.org/wiki/Download MediaWiki's Download website] to download the newest version of MediaWiki in .tar.gz format. Once you have the .tar.gz file, you must PuTTY the file into the webserver. Now you have to unzip the file into the working wiki directory. Move the zip into the root of the server block by running, &amp;lt;code&amp;gt;sudo mv ./mediawiki-install-zip /var/www/wiki-install-directory&amp;lt;/code&amp;gt;. Once you have moved the zip into the folder, you need to unzip it. Do so by running &amp;lt;code&amp;gt;sudo tar -xzvf ./mediawiki-install-zip&amp;lt;/code&amp;gt;. The best practice is to use a folder named &amp;quot;w&amp;quot;, for the wiki files, though we used the root directory. To change the directory's name, you will run &amp;lt;code&amp;gt;sudo mv ./mediawiki-install ./new-name&amp;lt;/code&amp;gt;. If you are moving all of the contents into the root website directory you will run, &amp;lt;code&amp;gt;sudo mv ./mediawiki-install/* ./&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Create a database for the wiki ===&lt;br /&gt;
The wiki needs specific parameters for the database to correctly function. Log into mysql by running &amp;lt;code&amp;gt;sudo mysql -u root -p&amp;lt;/code&amp;gt;. Once you log in you will run the following commands with your settings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CREATE DATABASE db_name;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CREATE USER 'wikiuser'@'localhost' IDENTIFIED BY 'db_password';&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GRANT ALL PRIVILEGES ON db_name.* TO 'wikiuser'@'localhost' WITH GRANT OPTION;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will successfully create the database and database user for your wiki.&lt;br /&gt;
&lt;br /&gt;
=== Install the wiki ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://wiki.24pin.tech/edit/MediaWiki:Sidebar to edit sidebar&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=File:MediaWiki-2020-logo.svg.png&amp;diff=1901</id>
		<title>File:MediaWiki-2020-logo.svg.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=File:MediaWiki-2020-logo.svg.png&amp;diff=1901"/>
		<updated>2022-08-08T17:01:11Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;fds&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Vim&amp;diff=1900</id>
		<title>Vim</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Vim&amp;diff=1900"/>
		<updated>2022-08-08T16:54:10Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: Lchristopherson moved page Vim/Nano to Vim without leaving a redirect: nano is literally text editor&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
== About ==&lt;br /&gt;
[[File:Vim-splash.png|thumb|The splash screen for Vim]]&lt;br /&gt;
According to the official Vim website, &amp;quot;Vim is a highly configurable text editor for efficiently creating and changing any kind of text. It is included as &amp;quot;vi&amp;quot; with most UNIX systems and with Apple OS X.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Basic Usage ==&lt;br /&gt;
The syntax for Vim is pretty straightforward. You can edit files by running &amp;lt;code&amp;gt;vim filename&amp;lt;/code&amp;gt; to open the file with Vim, but if the file doesn't exist Vim will create one for you. Once you're in the editor, press &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt; to start inserting text. After you're finished editing the file, press the escape key and then enter &amp;lt;code&amp;gt;:wq&amp;lt;/code&amp;gt; to save the file. If you need to exit out of the file, press escape and enter &amp;lt;code&amp;gt;:q&amp;lt;/code&amp;gt;, and if you need to exit without saving press escape and type &amp;lt;code&amp;gt;:q!&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other than that, there isn't much more that you need to know. For more advanced tips, check out the [https://vim.fandom.com/wiki/Vim_Tips_Wiki Vim Tips Wiki].&lt;br /&gt;
&lt;br /&gt;
'''NOTICE:''' Please make sure that you have permission to write to the directory that you're editing the file in. If you don't check and make sure, you won't be able to save the file and will lose whatever changes you made.&lt;br /&gt;
&lt;br /&gt;
== Common Problems ==&lt;br /&gt;
&lt;br /&gt;
=== Can't open file for writing ===&lt;br /&gt;
[[File:Vim-permissions.png|left|frameless]]&lt;br /&gt;
&lt;br /&gt;
This problem occurs when you don't have permission to write to the file. To fix this, press the escape key and type &amp;lt;code&amp;gt;:q!&amp;lt;/code&amp;gt; to quit without saving. Then, run the same command again but prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=PuTTY&amp;diff=1899</id>
		<title>PuTTY</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=PuTTY&amp;diff=1899"/>
		<updated>2022-08-08T05:56:20Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
[[File:Putty img.jpg|thumb|93x93px]]&lt;br /&gt;
PuTTY is a very useful program that allows you to communicate with outside devices through SSH. Putty is mainly used for remoting into machines outside of your network. You can download it [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html here].&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Remote into other System ===&lt;br /&gt;
&lt;br /&gt;
=== Send file to another System ===&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=File:Putty_img.jpg&amp;diff=1898</id>
		<title>File:Putty img.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=File:Putty_img.jpg&amp;diff=1898"/>
		<updated>2022-08-08T05:51:31Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;for putty page&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Bradley_Chamberlain&amp;diff=1897</id>
		<title>Bradley Chamberlain</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Bradley_Chamberlain&amp;diff=1897"/>
		<updated>2022-08-08T05:48:21Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: /* Beginning of the End (appx. 1997-2009) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About ==&lt;br /&gt;
[[File:Bradley1.jpg|thumb]]&lt;br /&gt;
The god of creation and ending. The man who will kill you '''and''' your entire family with the '''''EtherWhip™''''' or '''''The Axe™''''' mercilessly if you happen to make him too upset. Bradley Chamberlain is the man who has founded 24PinTechnologies with his own bare two hands, and single-handedly became a legend among former gods, he has dethroned every god known to man and has become something inevitable. Bradley Chamberlain.&lt;br /&gt;
&lt;br /&gt;
== Origin ==&lt;br /&gt;
It all began on November 1st, 1967. The man who will destroy anything and everything was born. Not much is known about Bradley's childhood life, but many speculate that Bradley Chamberlain lead a normal childhood life. In Bradley's young adult life, he engaged in the playing of a sport. That sports name would happen to be foosball... and it would change his life forever.&lt;br /&gt;
&lt;br /&gt;
== Foosball era (appx. 1986-1994) ==&lt;br /&gt;
Bradley Chamberlain had taken a keen interest to Foosball. This is the first thing in Bradley's life that makes since to him, and allows him to truly be ''free''. One occasion during these Foosball days, appx. 1989, Bradley had come in contact with a very import man in the tech industry, a ''god'' named Scott Manchester. This Deity, ''Scott Manchester'' had challenged everyone in the establishment to a duel in Foosball. Scott had claimed that there was no one in the world who could dethrone Scott as the Foosball champion, and the ''Digital Deity™''. Scott had caused a riot. &amp;quot;''hmm, what's this?''&amp;quot; Bradley curiously denounced. Bradley took a look around to see everyone going crazy over something, but what? People stared cheering, &amp;quot;'''Di-gi-tal De-i-ty, Di-gi-tal De-i-ty'''&amp;quot;. This chant piqued Bradley's interest. Bradley located the source of the chanting, the stage. Bradley walked up to the stage and challenged Scott Manchester to a Foosball duel to the death.&lt;br /&gt;
&lt;br /&gt;
=== The rise of a legend ===&lt;br /&gt;
Scott noticed Bradley among all of the other smelly nerds, and silenced the crowd. &amp;quot;'''''So you wish to duel me? To the death?'''''&amp;quot; Scott responded. Bradley didn't reply. This made Scott furious. Bradley simply watched. As the crowd grew louder, Scott scoffed. Bradley finally made his way up to the ring with Scott Manchester waiting for him. Scott smirked, and began to speak, &amp;quot;WELC-&amp;quot;! Immediately Bradley teleported behind Scott Manchester with a blank face staring down. &amp;quot;Are you sure you'd like to finish that?&amp;quot; Bradley exclaimed.&lt;br /&gt;
&lt;br /&gt;
=== The tale to be told for ages ===&lt;br /&gt;
Scott gulped. Without talking he started setting up the foosball table. Bradley walked to his side very slowly. When Bradley arrived to the table, the referee stated the stakes of this battle, &amp;quot;'''''You are betting your pride, titles, and lives. Do you both consent.'''''&amp;quot; Both of them nodded. Each of them gripped their handles, Scott grabbing a defensive and offensive handle, while Bradley grabbed two offensive handles. Scott smirked and thought, &amp;quot;''He's so stupid! Two offensive???''&amp;quot; Bradley said out loud, &amp;quot;'''Don't think so soon Scotty.'''&amp;quot; The game went on for approximately 4 minutes and 23 seconds. Bradley swept the floor with Scott. The crowd was in awe. As the last point was given to Bradley, Scott began begging for his life, and to be shown mercy. Bradley complied. Bradley would come to be known as one of the most merciful beings in existence. This battle is what allowed Bradley to gain his title as the '''Digital Deity'''.&lt;br /&gt;
&lt;br /&gt;
== Beginning of the End (appx. 1997-2009) ==&lt;br /&gt;
This is a very unknown part of Bradley's life, as he does not remember this era very well and it hasn't been documented well. What is known about this time period, is that Bradley had began his reign as the '''Digital Deity'''. Bradley would pillage any town if someone gave him the slightest attitude. The theory goes something along the lines of, &amp;quot;Bradley found a person who made him happy. This so called person didn't like the pointless violence that Bradley partook in, and therefore told him that if he didn't end the pointless violence and destruction, they would leave forever. This person eventually showed Bradley the meaning of compassion.&amp;quot; Bradley had finally learned '''''some''''' compassion. Instead of directing his anger at random civilians and towns, Bradley took it out on people who deserved it. Bradley gained his title as &amp;quot;'''The Merciless Bounty Hunter'''&amp;quot; through the only time in this era that has been documented.&lt;br /&gt;
&lt;br /&gt;
=== The Merciless Bounty Hunter ===&lt;br /&gt;
With Bradley's newfound compassion, he decided to use it for good. Bradley took to the streets, looking for people who have a price to pay. At first Bradley had begun to destroy petty criminals, with an axe that he had in his garage, but learned of the big time criminals who had a bounty on their heads. Bradley had set out to find his first victim, whomst was very difficult to locate. One Bradley did locate this first criminal however, he was slowly put to rest. ''The Axe&amp;lt;sup&amp;gt;TM&amp;lt;/sup&amp;gt;'' wasn't enough. Although Bradley put up a fight, he was pounced on by this criminal. This brought Bradley back to the drawing board. Bradley had never felt so embarrassed in his life, so therefore he had decided to curate a brand new weapon. The likes of which no one has ever seen before. Bradley spent weeks in the garage designing and perfecting this unholy weapon. Bradley had taken multiple ethernet cords, and combined them all together to create a whip of sorts. Bradley decided to name this the ''EtherWhip&amp;lt;sup&amp;gt;TM&amp;lt;/sup&amp;gt;''. Bradley did not need practice with this new weapon, as it was completely natural to him. This was a part of Bradley already. Bradley immediately set forth to find the same criminal, and when he did... let's just say that Bradley obtained a nice amount of money. This newfound way to bring out his violence and aggression mixed with the fact that he gets paid to do this pushed Bradley to become a name to fear. Everyone who obtained a bounty feared for their very lives, as Bradley would always find them, and finish them swiftly.&lt;br /&gt;
&lt;br /&gt;
== The founding of 24PinTechnologies (appx. 2010-present) ==&lt;br /&gt;
After several years of gaining money through bounties, Bradley become quite tired, though Bradley's thirst for excitement was not quite quenched yet. Bradley had always thought that his dream would be to start a business where he can truly be himself, and with his compassion he had acquired, he wanted to help others be themselves as well. Bradley used his title as the '''Digital Deity''' to start a nonprofit IT business through the local school in his town. The business became a booming success, with people finding their places through his program. Bradley had also benefited from this as he could still &amp;quot;punish&amp;quot; the bad kids, RIP, and gain passive income, all while being who he truly wants to be. Bradley had finally found true happiness.&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=User:Lchristopherson&amp;diff=1896</id>
		<title>User:Lchristopherson</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=User:Lchristopherson&amp;diff=1896"/>
		<updated>2022-08-08T05:18:05Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: /* About */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About ==&lt;br /&gt;
Hey, my name is Luke Christopherson, and at the time of writing this article I am 17 years old, and about to graduate high school as a senior. I have had a tough time throughout my high school career, and never really found a place I wanted to be. I had switched schools many, many, many times due to a toxic home environment, and ended up at MHS. I transferred to IT Essentials from Video Game Development, and the thing I remember the most, is [[Bradley Chamberlain]] asking me if I'll be okay in this class because its &amp;quot;hardcore&amp;quot; and &amp;quot;nothing like Video Game Development&amp;quot;. I did fine. My sophomore year of high school, I was selected to work on the SIEM project, which has now been taken over by Alex Grace. The only reason I did not continue to work on the SIEM, is because the project was assigned around the time when Covid hit. We went online, and I never touched it again. In my Junior year of high school, as well as my first year in 24PinTech, I was not very involved. I was still feeling lazy from Covid and did basically nothing. Once I started my Senior year, I really felt like I wanted to prove that I'm good enough to be remembered in the class. In the first semester I didn't do much. Once I started on the webserver, it was all over for the haters. I mastered Linux, and Nginx, and our Webserver very, very fast. I found this stuff to be relatable to my background in programming, and really enjoyed every minute of working on it... besides adding Wordpress salts. That's about it though, thanks for reading!&lt;br /&gt;
&lt;br /&gt;
== Certifications ==&lt;br /&gt;
&lt;br /&gt;
* '''CompTIA A+'''&lt;br /&gt;
* Testout Linux Pro&lt;br /&gt;
* Testout Security Pro&lt;br /&gt;
* Testout PC Pro&lt;br /&gt;
&lt;br /&gt;
== Awards ==&lt;br /&gt;
&lt;br /&gt;
* First Place Gold Medalist, AZSkillsUSA - Web Design&lt;br /&gt;
* First Place Gold Medalist, AZSkillsUSA - Career Pathways Showcase (IT)&lt;br /&gt;
&lt;br /&gt;
== My Mark ==&lt;br /&gt;
To be honest, there's not a lot I can talk about when it comes to what I left for 24PinTech. Most of my time was spent in the backend, which not many people would understand. I suppose what you can thank me for is pretty links, an organized web server, and backups??? I don't know man, a lot of it was cleaning up other people's work, and expanding on it. W. Oh and also I am the first person to perform a successful heist on the ''EtherWhip&amp;lt;sup&amp;gt;TM&amp;lt;/sup&amp;gt;''.&lt;br /&gt;
&lt;br /&gt;
== Where I am ==&lt;br /&gt;
As of now I am working as an IT Field Technician for a small company called ALOA-ETS. It's very fun because the IT portion of the company is not very mature yet, and with me being the only IT person, I get to shape it how I like. I find that this job gives me the same freedom I got from 24PinTech, and I'll tell you, the skills are transferring very good. I have created a web server for them through Azure, (weird), and I get to research a lot of new fun stuff. My boss doesn't know a lot of backend stuff in IT, which gives me an advantage to learn a lot more about backend IT services, which just so happens to be my favorite part. Though I am learning that everything I'm learning was a part of 24PinTech, which is super cool. Thank you [[Bradley Chamberlain|Bradford]].&lt;br /&gt;
&lt;br /&gt;
I am also going to college at ASU Online. Originally I was planning on going on-campus, but things changed at home, and that wasn't an option anymore. I am majoring in Software Engineering, and I'm very excited to take Calculus for Engineers I and Calculus for Engineers II in one semester! not. I feel that college will take me places I never thought possible, which I am extremely excited to do. Wish me luck.&lt;br /&gt;
&lt;br /&gt;
== Contact ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Contact Information&lt;br /&gt;
!Phone&lt;br /&gt;
!Email&lt;br /&gt;
!Other&lt;br /&gt;
|-&lt;br /&gt;
|(480) 295-0194&lt;br /&gt;
|lukechristopherson0@gmail.com&lt;br /&gt;
|Homing Pigeon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, I really enjoyed my time at 24PinTech, and love all of the memories I made. I didn't do as much as I wanted to, or could do, but I am still very happy to have been a part of this program nonetheless.&lt;br /&gt;
&lt;br /&gt;
-Luke&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=HTTPS_with_Certbot_(LetsEncrypt)&amp;diff=1853</id>
		<title>HTTPS with Certbot (LetsEncrypt)</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=HTTPS_with_Certbot_(LetsEncrypt)&amp;diff=1853"/>
		<updated>2022-05-30T19:43:37Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
[[File:Certbot logo.png|left|thumb|231x231px]]&lt;br /&gt;
When the internet first started, all of the websites ran on an insecure port 80, which is also known as HTTP. There were quite a few issues with this, like when a packet of data would be sent to a server with sensitive information, an outside attacker could listen and take that data. HTTPS uses and encrypted protocol called [[Three Letter Acronym (TLA)|SSL]] to encrypt data being sent. You can watch this [https://www.youtube.com/watch?v=0PHCAdw6Z8w&amp;amp;ab_channel=SecurityMetrics%2CInc. video] for more information on the subject.&lt;br /&gt;
&lt;br /&gt;
By default, [[Nginx]] runs on port 80, which is insecure HTTP, this is something that should be fixed before making the site public. To enable HTTPS, every site needs its own certificate, although they can be very hard and tedious to create manually, which is why we utilize the free program Certbot! Certbot provides a very simple way to create and apply these certificates to ensure a secure connection.&lt;br /&gt;
&lt;br /&gt;
== Pre-requisites ==&lt;br /&gt;
&lt;br /&gt;
* Linux Ubuntu&lt;br /&gt;
* Working Nginx Webserver&lt;br /&gt;
* Running server block/website on Port 80 (HTTP)&lt;br /&gt;
* Sudo privileges&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
To begin, verify that the website that you'd like to open HTTPS is valid and up on the World Wide Web. This just means having a working [[Nginx]] domain set up. You can view how to add a new Nginx Domain/Subdomain [[Adding a New Domain or Subdomain|here]].&lt;br /&gt;
&lt;br /&gt;
To install Certbot, you will run the commands &amp;lt;code&amp;gt;sudo apt-get install certbot&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sudo apt-get install python-certbot-nginx&amp;lt;/code&amp;gt;, to install Certbot for our specific server setup. Once this is done, you will be able to create an HTTPS certificate for any website running.&lt;br /&gt;
&lt;br /&gt;
== Creating an Nginx HTTPS Certificate ==&lt;br /&gt;
To create a new HTTPS certificate, you may run &amp;lt;code&amp;gt;sudo certbot&amp;lt;/code&amp;gt;. This command will bring up a list of all of the available domains on the webserver, and number them, you will choose a number and it will install the certificate. It is as simple as that!&lt;br /&gt;
&lt;br /&gt;
Another way to install a certificate is to run &amp;lt;code&amp;gt;sudo certbot --nginx -d domain.com&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;domain.com&amp;lt;/code&amp;gt; is the name of the domain that you want to add.&lt;br /&gt;
&lt;br /&gt;
=== Verification ===&lt;br /&gt;
To verify if the HTTPS domain is valid, run &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; to check for any server config file errors. If that test returns successful, navigate to the website in your web browser of choice (Google Chrome), and check for the little lock next to the name of the website, if that has appeared, you have successfully installed Certbot onto that domain.&lt;br /&gt;
&lt;br /&gt;
== Removing an Nginx HTTPS Certificate ==&lt;br /&gt;
To remove a certificate from a domain, you will run the command &amp;lt;code&amp;gt;sudo certbot delete&amp;lt;/code&amp;gt;. Like the command to create a certificate, this will bring up a list of all of the certificates available numbered. You will enter the number of the certificate, and it will be removed, it's that simple.&lt;br /&gt;
&lt;br /&gt;
=== Verification ===&lt;br /&gt;
To verify you didn't break everything like I (Luke), have done multiple times, you will run &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt;. If this test returns successful, you may navigate to your web browser of choice (Google Chrome), and check next to the URL for a sign that says &amp;quot;Not Secure&amp;quot;. This will complete the deletion of a certificate.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
'''Note:''' '''It could possibly take up to 24-72 hours for it to be enabled, although at the time of writing the changes propagated almost immediately.'''&lt;br /&gt;
&lt;br /&gt;
'''Extra Note:''' '''All Certbot certificates should auto-renew every 90 days.'''&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Nginx&amp;diff=1852</id>
		<title>Nginx</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Nginx&amp;diff=1852"/>
		<updated>2022-05-30T19:24:51Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
==About==&lt;br /&gt;
Nginx (pronounced engine-x) is web server which can also be used  proxy, load balancer, mail proxy and HTTP cache. It's also a modern alternative to something like Apache, IIS, or Caddy.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
An nginx installation should be pretty accessible regardless of your OS. This guide is specifically written for Ubuntu Server 18.04 LTS, but should work on any other type of Unix operating system. The setup that we're using is commonly referred to as a LEMP stack (Linux, nginx, MySQL, PHP.)&lt;br /&gt;
&lt;br /&gt;
*nginx/1.14.0 (Ubuntu)&lt;br /&gt;
*PHP 7.2.10-0ubuntu0.18.04.1 (cli)&lt;br /&gt;
*MySQL v14.14 Distribution 5.7.24&lt;br /&gt;
&lt;br /&gt;
If you've just installed a new operating system, you'll want to update your local package index by running &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt;, and then add the Universe repository by running &amp;lt;code&amp;gt;sudo apt-add-repository universe&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Installing nginx==&lt;br /&gt;
To start, you're going to want to install nginx using the aptitude package manager. You can do this by running &amp;lt;code&amp;gt;sudo apt-get install nginx&amp;lt;/code&amp;gt;. Once you run that, you'll want to go through the configuration prompt that appears.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
After nginx and its subsequent dependencies have finished installing, you'll want to let it through the firewall by running &amp;lt;code&amp;gt;sudo ufw allow 'Nginx HTTP'&amp;lt;/code&amp;gt;. Check what your current IP is by running &amp;lt;code&amp;gt;ifconfig&amp;lt;/code&amp;gt;, and then look for whatever interface looks correct. In this instance, the proper interface is &amp;lt;code&amp;gt;eth0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
[[File:Ifconfig-example.png|left|frame|an example of the results from ifconfig]]&lt;br /&gt;
After running the command, the first indented line should say '''''inet''''' and then an IP address afterwards. Verify functionality of nginx by going to your web browser and typing &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://{ip}/&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;{ip}&amp;lt;/code&amp;gt; is what follows after '''''inet'''''.&lt;br /&gt;
&lt;br /&gt;
If the default nginx page displays, continue to the next section.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
==Installing MySQL==&lt;br /&gt;
The process of installing MySQL is fairly similar to installing nginx, although MySQL does require a little bit of configuration before it will function properly. Start off by running &amp;lt;code&amp;gt;sudo apt-get install mysql-server&amp;lt;/code&amp;gt;, and then once it finishes run the setup script by typing &amp;lt;code&amp;gt;sudo mysql_secure_installation&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
The first thing that the installations script will ask you is if you'd like to enable the &amp;lt;code&amp;gt;VALIDATE PASSWORD PLUGIN&amp;lt;/code&amp;gt;, but don't. If you don't care about why, then skip to the next paragraph, but if you do, keep reading. Essentially, the plugin throws errors if passwords don't meet specific criteria. This causes issues if you either a.) use weak passwords, or b.) install a package that automatically compiles and creates a default account with basic credentials. '''It is always good practice to use strong passwords for everything, and database credentials are no exception.'''&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
Say yes to the rest of the questions and use good judgement if it asks something that requires anything other than a Y/N input.&lt;br /&gt;
&lt;br /&gt;
==Installing PHP==&lt;br /&gt;
Again, installing PHP is very similar to two sections preceding this one. Start off by installing the &amp;lt;code&amp;gt;php-fpm&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;php-mysql&amp;lt;/code&amp;gt; packages by running &amp;lt;code&amp;gt;sudo apt-get install php-fpm php-mysql&amp;lt;/code&amp;gt;. After it installs, you'll want to edit &amp;lt;code&amp;gt;php.ini&amp;lt;/code&amp;gt; by running &amp;lt;code&amp;gt;sudo vim /etc/php/7.4/fpm/php.ini&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
'''''Note:''' If the file isn't found, check'' the directory path by using the &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; command and seeing where something doesn't exist.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
If you're using Vim, type a &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt; and search for &amp;lt;code&amp;gt;cgi.fix_pathinfo&amp;lt;/code&amp;gt;. You should be taken to a line that's commented out and says &amp;lt;code&amp;gt;;cgi.fix_pathinfo=0&amp;lt;/code&amp;gt; or something similar. Press the &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt; key to start editing and remove the &amp;lt;code&amp;gt;;&amp;lt;/code&amp;gt; to uncomment it. If the variable is set to 1, change it to 0. Press the &amp;lt;code&amp;gt;escape&amp;lt;/code&amp;gt; key and type &amp;lt;code&amp;gt;:wq&amp;lt;/code&amp;gt; to save and quit your changes. If you didn't run Vim as a superuser (if you didn't run the command with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;), it will throw and error and the file won't save.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
Once the file saves, run &amp;lt;code&amp;gt;sudo systemctl restart php7.4-fpm&amp;lt;/code&amp;gt; to restart PHP.&lt;br /&gt;
&lt;br /&gt;
==Configuring nginx==&lt;br /&gt;
The configuration for nginx is a little different compared to anything you might be used to. To start, there are two directories: &amp;lt;code&amp;gt;sites-available&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sites-enabled&amp;lt;/code&amp;gt;. The former directory actually contains the configuration files, while the latter contains symbolic links to the configuration files and enables them.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
To start, lets say that we wanted to configure our nginx server to work with the domain &amp;lt;code&amp;gt;example.ms&amp;lt;/code&amp;gt;. First, we'd want to verify that the directory &amp;lt;code&amp;gt;/var/www/example.ms&amp;lt;/code&amp;gt; exists. Move to the &amp;lt;code&amp;gt;sites-available&amp;lt;/code&amp;gt; directory by entering the command &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. Next, you'll want to create a new configuration file with the name of the domain. You can either by running &amp;lt;code&amp;gt;sudo touch example.ms &amp;amp;&amp;amp; sudo vim example.ms&amp;lt;/code&amp;gt; or simply by running &amp;lt;code&amp;gt;sudo vim example.ms&amp;lt;/code&amp;gt; since Vim creates the file if it doesn't exist. Again, press &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt; to edit the file. Once you're in edit mode, you'll want the contents to look something like this:&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
     listen 80;&lt;br /&gt;
     listen [::]:80;&lt;br /&gt;
&lt;br /&gt;
     # this is a comment! you don't have to include this, but if you're not&lt;br /&gt;
     # going to be using a domain, then you can replace it with an IP&lt;br /&gt;
     server_name example.ms;&lt;br /&gt;
&lt;br /&gt;
     root /var/www/example.ms;&lt;br /&gt;
     index index.php index.html index.htm;&lt;br /&gt;
&lt;br /&gt;
     location = /favicon.io {&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location = /robots.txt {&lt;br /&gt;
          allow all;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location / {&lt;br /&gt;
          try_files $uri $uri/ /index.php$args;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~ \.php$ {&lt;br /&gt;
          include snippets/fastcgi-php.conf;&lt;br /&gt;
          fastcgi_intercept_errors on;&lt;br /&gt;
          fastcgi_pass unix:/run/php/php7.2-fpm.sock;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {&lt;br /&gt;
          expires max;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;'''''Tip:''' You can periodically save your configuration file by pressing &amp;lt;code&amp;gt;escape&amp;lt;/code&amp;gt;, typing &amp;lt;code&amp;gt;:w&amp;lt;/code&amp;gt; , and then pressing &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt; again to edit the file.''&lt;br /&gt;
&lt;br /&gt;
'''''Tip''''': If you are adding another domain the &amp;lt;code&amp;gt;listen 80;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;listen [::]:80;&amp;lt;/code&amp;gt; isn't needed and you can go from &amp;lt;code&amp;gt;server {&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;server_name example.ms;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''.''&lt;br /&gt;
&lt;br /&gt;
Once you're completely done editing, save and quit the file by pressing the escape key and typing &amp;lt;code&amp;gt;:wq&amp;lt;/code&amp;gt;. Finally, you can check your configuration file for errors by running &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt;. If there are any errors, refer back to your configuration file and see where you went wrong. In the event that nginx threw an error, review your configuration file and look for any missing &amp;lt;code&amp;gt;{&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;}&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;;&amp;lt;/code&amp;gt;. Every line that doesn't have curly brackets should end in a semicolon, which is probably the issue. If that isn't, then refer to your favorite search engine and start researching.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
If nothing went wrong, and your configuration file is completely free of errors, run &amp;lt;code&amp;gt;cd ../sites-enabled&amp;lt;/code&amp;gt; to move to the sites-enabled directory. Finally, to enable your website, run &amp;lt;code&amp;gt;sudo ln -s /etc/nginx/sites-available/example.ms ./&amp;lt;/code&amp;gt; to create the symbolic link to your configuration file, and then run &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt; to restart nginx and make your changes go live.&lt;br /&gt;
&lt;br /&gt;
==Verifying Functionality==&lt;br /&gt;
Of course, you'll want to make sure that everything you just did actually works. Run &amp;lt;code&amp;gt;cd /var/www/example.ms &amp;amp;&amp;amp; sudo vim info.php&amp;lt;/code&amp;gt; to move to your websites home directory and create the file &amp;lt;code&amp;gt;info.php&amp;lt;/code&amp;gt;. Inside of the file, type the following:&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
     phpinfo();&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;... and then save and quit the file by pressing &amp;lt;code&amp;gt;escape&amp;lt;/code&amp;gt; and typing &amp;lt;code&amp;gt;:wq&amp;lt;/code&amp;gt;. Now, go to &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://example.ms/info.php&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. If you didn't configure the nameservers for your domain to point to your new nginx server, then just replace the domain name with the IP of the server (refer to the &amp;lt;code&amp;gt;ifconfig&amp;lt;/code&amp;gt; part of the [[Nginx#Installing nginx|Installing nginx]] section if you don't know how.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If everything worked properly, you should see a PHP information page with a bunch of library authors and enabled modules. If it doesn't, research!&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
Over time we have run into a few quirks with this server that we listed here....&lt;br /&gt;
&lt;br /&gt;
===Resetting the IP address===&lt;br /&gt;
Unfortunately we have found that from time to time on server reboots the server forgets the IP address for the webserver.  Here is what you need to do to fix it.&lt;br /&gt;
&lt;br /&gt;
Open up the ESXI sesson on .2 and access the webserver.  Login with the server admin credentials, ask Chamberlain if you don't know.  Enter the following commands...&lt;br /&gt;
&lt;br /&gt;
sudo ifconfig ens32 x.x.x.11 netmask 255.255.255.0 (where x.x.x are the network address of our subnet)&lt;br /&gt;
&lt;br /&gt;
sudo route add default gw x.x.x.1 ens32 (where x.x.x are the network address of our subnet)&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
By now, your nginx server should be up and fully operational. As always, if you're having any issues please [[Three Letter Acronym (TLA)|STFW]] before you ask people for advice!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thank you,&lt;br /&gt;
&lt;br /&gt;
- Tyler &amp;amp; Luke&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Bradley_Chamberlain&amp;diff=1851</id>
		<title>Bradley Chamberlain</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Bradley_Chamberlain&amp;diff=1851"/>
		<updated>2022-05-20T22:06:32Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About ==&lt;br /&gt;
[[File:Bradley1.jpg|thumb]]&lt;br /&gt;
The god of creation and ending. The man who will kill you '''and''' your entire family with the '''''EtherWhip™''''' or '''''The Axe™''''' mercilessly if you happen to make him too upset. Bradley Chamberlain is the man who has founded 24PinTechnologies with his own bare two hands, and single-handedly became a legend among former gods, he has dethroned every god known to man and has become something inevitable. Bradley Chamberlain.&lt;br /&gt;
&lt;br /&gt;
== Origin ==&lt;br /&gt;
It all began on November 1st, 1967. The man who will destroy anything and everything was born. Not much is known about Bradley's childhood life, but many speculate that Bradley Chamberlain lead a normal childhood life. In Bradley's young adult life, he engaged in the playing of a sport. That sports name would happen to be foosball... and it would change his life forever.&lt;br /&gt;
&lt;br /&gt;
== Foosball era (appx. 1986-1994) ==&lt;br /&gt;
Bradley Chamberlain had taken a keen interest to Foosball. This is the first thing in Bradley's life that makes since to him, and allows him to truly be ''free''. One occasion during these Foosball days, appx. 1989, Bradley had come in contact with a very import man in the tech industry, a ''god'' named Scott Manchester. This Deity, ''Scott Manchester'' had challenged everyone in the establishment to a duel in Foosball. Scott had claimed that there was no one in the world who could dethrone Scott as the Foosball champion, and the ''Digital Deity™''. Scott had caused a riot. &amp;quot;''hmm, what's this?''&amp;quot; Bradley curiously denounced. Bradley took a look around to see everyone going crazy over something, but what? People stared cheering, &amp;quot;'''Di-gi-tal De-i-ty, Di-gi-tal De-i-ty'''&amp;quot;. This chant piqued Bradley's interest. Bradley located the source of the chanting, the stage. Bradley walked up to the stage and challenged Scott Manchester to a Foosball duel to the death.&lt;br /&gt;
&lt;br /&gt;
=== The rise of a legend ===&lt;br /&gt;
Scott noticed Bradley among all of the other smelly nerds, and silenced the crowd. &amp;quot;'''''So you wish to duel me? To the death?'''''&amp;quot; Scott responded. Bradley didn't reply. This made Scott furious. Bradley simply watched. As the crowd grew louder, Scott scoffed. Bradley finally made his way up to the ring with Scott Manchester waiting for him. Scott smirked, and began to speak, &amp;quot;WELC-&amp;quot;! Immediately Bradley teleported behind Scott Manchester with a blank face staring down. &amp;quot;Are you sure you'd like to finish that?&amp;quot; Bradley exclaimed.&lt;br /&gt;
&lt;br /&gt;
=== The tale to be told for ages ===&lt;br /&gt;
Scott gulped. Without talking he started setting up the foosball table. Bradley walked to his side very slowly. When Bradley arrived to the table, the referee stated the stakes of this battle, &amp;quot;'''''You are betting your pride, titles, and lives. Do you both consent.'''''&amp;quot; Both of them nodded. Each of them gripped their handles, Scott grabbing a defensive and offensive handle, while Bradley grabbed two offensive handles. Scott smirked and thought, &amp;quot;''He's so stupid! Two offensive???''&amp;quot; Bradley said out loud, &amp;quot;'''Don't think so soon Scotty.'''&amp;quot; The game went on for approximately 4 minutes and 23 seconds. Bradley swept the floor with Scott. The crowd was in awe. As the last point was given to Bradley, Scott began begging for his life, and to be shown mercy. Bradley complied. Bradley would come to be known as one of the most merciful beings in existence. This battle is what allowed Bradley to gain his title as the '''Digital Deity'''.&lt;br /&gt;
&lt;br /&gt;
== Beginning of the End (appx. 1997-2009) ==&lt;br /&gt;
&lt;br /&gt;
== The founding of 24PinTechnologies (appx. 2010-present) ==&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=File:Bradley1.jpg&amp;diff=1850</id>
		<title>File:Bradley1.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=File:Bradley1.jpg&amp;diff=1850"/>
		<updated>2022-05-20T22:03:59Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;for the bradley chamberlain page&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Bradley_Chamberlain&amp;diff=1843</id>
		<title>Bradley Chamberlain</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Bradley_Chamberlain&amp;diff=1843"/>
		<updated>2022-05-18T16:04:37Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: /* The rise of a legend */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About ==&lt;br /&gt;
The god of creation and ending. The man who will kill you '''and''' your entire family with the '''''EtherWhip™''''' or '''''The Axe™''''' mercilessly if you happen to make him too upset. Bradley Chamberlain is the man who has founded 24PinTechnologies with his own bare two hands, and single-handedly became a legend among former gods, he has dethroned every god known to man and has become something inevitable. Bradley Chamberlain.&lt;br /&gt;
&lt;br /&gt;
== Origin ==&lt;br /&gt;
It all began on November 1st, 1967. The man who will destroy anything and everything was born. Not much is known about Bradley's childhood life, but many speculate that Bradley Chamberlain lead a normal childhood life. In Bradley's young adult life, he engaged in the playing of a sport. That sports name would happen to be foosball... and it would change his life forever.&lt;br /&gt;
&lt;br /&gt;
== Foosball era (appx. 1986-1994) ==&lt;br /&gt;
Bradley Chamberlain had taken a keen interest to Foosball. This is the first thing in Bradley's life that makes since to him, and allows him to truly be ''free''. One occasion during these Foosball days, appx. 1989, Bradley had come in contact with a very import man in the tech industry, a ''god'' named Scott Manchester. This Deity, ''Scott Manchester'' had challenged everyone in the establishment to a duel in Foosball. Scott had claimed that there was no one in the world who could dethrone Scott as the Foosball champion, and the ''Digital Deity™''. Scott had caused a riot. &amp;quot;''hmm, what's this?''&amp;quot; Bradley curiously denounced. Bradley took a look around to see everyone going crazy over something, but what? People stared cheering, &amp;quot;'''Di-gi-tal De-i-ty, Di-gi-tal De-i-ty'''&amp;quot;. This chant piqued Bradley's interest. Bradley located the source of the chanting, the stage. Bradley walked up to the stage and challenged Scott Manchester to a Foosball duel to the death.&lt;br /&gt;
&lt;br /&gt;
=== The rise of a legend ===&lt;br /&gt;
Scott noticed Bradley among all of the other smelly nerds, and silenced the crowd. &amp;quot;'''''So you wish to duel me? To the death?'''''&amp;quot; Scott responded. Bradley didn't reply. This made Scott furious. Bradley simply watched. As the crowd grew louder, Scott scoffed. Bradley finally made his way up to the ring with Scott Manchester waiting for him. Scott smirked, and began to speak, &amp;quot;WELC-&amp;quot;! Immediately Bradley teleported behind Scott Manchester with a blank face staring down. &amp;quot;Are you sure you'd like to finish that?&amp;quot; Bradley exclaimed.&lt;br /&gt;
&lt;br /&gt;
=== The tale to be told for ages ===&lt;br /&gt;
Scott gulped. Without talking he started setting up the foosball table. Bradley walked to his side very slowly. When Bradley arrived to the table, the referee stated the stakes of this battle, &amp;quot;'''''You are betting your pride, titles, and lives. Do you both consent.'''''&amp;quot; Both of them nodded. Each of them gripped their handles, Scott grabbing a defensive and offensive handle, while Bradley grabbed two offensive handles. Scott smirked and thought, &amp;quot;''He's so stupid! Two offensive???''&amp;quot; Bradley said out loud, &amp;quot;'''Don't think so soon Scotty.'''&amp;quot; The game went on for approximately 4 minutes and 23 seconds. Bradley swept the floor with Scott. The crowd was in awe. As the last point was given to Bradley, Scott began begging for his life, and to be shown mercy. Bradley complied. Bradley would come to be known as one of the most merciful beings in existence. This battle is what allowed Bradley to gain his title as the '''Digital Deity'''.&lt;br /&gt;
&lt;br /&gt;
== Beginning of the End (appx. 1997-2009) ==&lt;br /&gt;
&lt;br /&gt;
== The founding of 24PinTechnologies (appx. 2010-present) ==&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=HTTPS_with_Certbot_(LetsEncrypt)&amp;diff=1842</id>
		<title>HTTPS with Certbot (LetsEncrypt)</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=HTTPS_with_Certbot_(LetsEncrypt)&amp;diff=1842"/>
		<updated>2022-05-18T14:56:55Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
[[File:Certbot logo.png|left|thumb|231x231px]]&lt;br /&gt;
When the internet first started, all of the websites ran on an insecure port 80, which is also known as HTTP. There were quite a few issues with this, like when a packet of data would be sent to a server with sensitive information, an outside attacker could listen and take that data. HTTPS uses and encrypted protocol called [[Three Letter Acronym (TLA)|SSL]] to encrypt data being sent. You can watch this [https://www.youtube.com/watch?v=0PHCAdw6Z8w&amp;amp;ab_channel=SecurityMetrics%2CInc. video] for more information on the subject.&lt;br /&gt;
&lt;br /&gt;
By default, [[Nginx]] runs on port 80, which is insecure HTTP, this is something that should be fixed before making the site public. To enable HTTPS, every site needs its own certificate, although they can be very hard and tedious to create manually, which is why we utilize the free program Certbot! Certbot provides a very simple way to create and apply these certificates to ensure a secure connection.&lt;br /&gt;
&lt;br /&gt;
== Pre-requisites ==&lt;br /&gt;
&lt;br /&gt;
* Linux Ubuntu&lt;br /&gt;
* Working Nginx Webserver&lt;br /&gt;
* Running server block/website on Port 80 (HTTP)&lt;br /&gt;
* Sudo privileges&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
To begin, verify that the website that you'd like to open HTTPS is valid and up on the World Wide Web.&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=User:Lchristopherson&amp;diff=1839</id>
		<title>User:Lchristopherson</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=User:Lchristopherson&amp;diff=1839"/>
		<updated>2022-05-13T06:01:42Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: /* About */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About ==&lt;br /&gt;
Hey, my name is Luke Christopherson, and at the time of writing this article I am 17 years old, and about to graduate high school as a senior. I have had a tough time throughout my high school career, and never really found a place I wanted to be. I had switched schools many, many, many times due to a toxic home environment, and ended up at MHS. I transferred to IT Essentials from Video Game Development, and the thing I remember the most, is [[Bradley Chamberlain]] asking me if I'll be okay in this class because its &amp;quot;hardcore&amp;quot; and &amp;quot;nothing like Video Game Development&amp;quot;. I did fine. My sophomore year of high school, I was selected to work on the SIEM project, which has now been taken over by Alex Grace. The only reason I did not continue to work on the SIEM, is because the project was assigned around the time when Covid hit. We went online, and I never touched it again. In my Junior year of high school, as well as my first year in 24PinTech, I was not very involved. I was still feeling lazy from Covid and did basically nothing. Once I started my Senior year, I really felt like I wanted to prove that I'm good enough to be remembered in the class. In the first semester I didn't do much. Once I started on the webserver, it was all over for the haters. I mastered Linux, and Nginx, and our Webserver in less than a month, fixing issues that even the great &amp;quot;Tyler Griego&amp;quot; could not. With. No. Experience. Enough said. I might be a little too proud...&lt;br /&gt;
&lt;br /&gt;
== Certifications ==&lt;br /&gt;
&lt;br /&gt;
* '''CompTIA A+'''&lt;br /&gt;
* Testout Linux Pro&lt;br /&gt;
* Testout Security Pro&lt;br /&gt;
* Testout PC Pro&lt;br /&gt;
&lt;br /&gt;
== Awards ==&lt;br /&gt;
&lt;br /&gt;
* First Place Gold Medalist, AZSkillsUSA - Web Design&lt;br /&gt;
* First Place Gold Medalist, AZSkillsUSA - Career Pathways Showcase (IT)&lt;br /&gt;
&lt;br /&gt;
== My Mark ==&lt;br /&gt;
&lt;br /&gt;
== Where I am ==&lt;br /&gt;
your moms house&lt;br /&gt;
&lt;br /&gt;
== Contact ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Contact Information&lt;br /&gt;
!Phone&lt;br /&gt;
!Email&lt;br /&gt;
!Other&lt;br /&gt;
|-&lt;br /&gt;
|(480) 295-0194&lt;br /&gt;
|lukechristopherson0@gmail.com&lt;br /&gt;
|Homing Pigeon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=User:Lchristopherson&amp;diff=1838</id>
		<title>User:Lchristopherson</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=User:Lchristopherson&amp;diff=1838"/>
		<updated>2022-05-13T06:00:18Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: /* About */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About ==&lt;br /&gt;
Hey, my name is Luke Christopherson, and at the time of writing this article I am 17 years old, and about to graduate high school as a senior. I have had a tough time throughout my high school career, and never really found a place I wanted to be. I had switched schools many, many, many times due to a toxic home environment, and ended up at MHS. I transferred to IT Essentials from Video Game Development, and the thing I remember the most, is [[Bradley Chamberlain]] asking me if I'll be okay in this class because its &amp;quot;hardcore&amp;quot; and &amp;quot;nothing like Video Game Development&amp;quot;. I did fine. My sophomore year of high school, I was selected to work on the SIEM project, which has now been taken over by Alex Grace. The only reason I did not continue to work on the SIEM, is because the project was assigned around the time when Covid hit. We went online, and I never touched it again. In my Junior year of high school, as well as my first year in 24PinTech, I was not very involved. I was still feeling lazy from Covid and did basically nothing. Once I started my Senior year, I really felt like I wanted to prove that I'm good enough to be remembered in the class. In the first semester I didn't do much. Once I started on the webserver, it was all over for the haters. I mastered Linux, and Nginx, and our Webserver in less than a month, fixing isbsues that even the great &amp;quot;Tyler Griego&amp;quot; could not. With. No. Experience. Enough said. I might be a little too proud...&lt;br /&gt;
&lt;br /&gt;
== Certifications ==&lt;br /&gt;
&lt;br /&gt;
* '''CompTIA A+'''&lt;br /&gt;
* Testout Linux Pro&lt;br /&gt;
* Testout Security Pro&lt;br /&gt;
* Testout PC Pro&lt;br /&gt;
&lt;br /&gt;
== Awards ==&lt;br /&gt;
&lt;br /&gt;
* First Place Gold Medalist, AZSkillsUSA - Web Design&lt;br /&gt;
* First Place Gold Medalist, AZSkillsUSA - Career Pathways Showcase (IT)&lt;br /&gt;
&lt;br /&gt;
== My Mark ==&lt;br /&gt;
&lt;br /&gt;
== Where I am ==&lt;br /&gt;
your moms house&lt;br /&gt;
&lt;br /&gt;
== Contact ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Contact Information&lt;br /&gt;
!Phone&lt;br /&gt;
!Email&lt;br /&gt;
!Other&lt;br /&gt;
|-&lt;br /&gt;
|(480) 295-0194&lt;br /&gt;
|lukechristopherson0@gmail.com&lt;br /&gt;
|Homing Pigeon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Alumni&amp;diff=1837</id>
		<title>Alumni</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Alumni&amp;diff=1837"/>
		<updated>2022-05-13T05:59:01Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a list of notable alumni of the 24pintech program, if you would like to join the list after graduation please speak with Chamberlain.&lt;br /&gt;
&lt;br /&gt;
*[[User:AOwen|Ashton Owen]]&lt;br /&gt;
*[[User:Lchristopherson|Luke Christopherson]]&lt;br /&gt;
*[[User:NShearer|Nathan Shearer]]&lt;br /&gt;
*[[User talk:Nick Perez|Nick Perez]]&lt;br /&gt;
*Omar Perez (W.I.P)&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=User:Lchristopherson&amp;diff=1836</id>
		<title>User:Lchristopherson</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=User:Lchristopherson&amp;diff=1836"/>
		<updated>2022-05-13T05:57:24Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: Created page with &amp;quot;== About == Hey, my name is Luke Christopherson, and at the time of writing this article I am 17 years old, and about to graduate high school as a senior. I have had a tough time throughout my high school career, and never really found a place I wanted to be. I had switched schools many, many, many times due to a toxic home environment, and ended up at MHS. I transferred to IT Essentials from Video Game Development, and the thing I remember the most, is Bradley Chamber...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About ==&lt;br /&gt;
Hey, my name is Luke Christopherson, and at the time of writing this article I am 17 years old, and about to graduate high school as a senior. I have had a tough time throughout my high school career, and never really found a place I wanted to be. I had switched schools many, many, many times due to a toxic home environment, and ended up at MHS. I transferred to IT Essentials from Video Game Development, and the thing I remember the most, is [[Bradley Chamberlain]] asking me if I'll ne okay in this class because its &amp;quot;hardcore&amp;quot; and &amp;quot;nothing like Video Game Development&amp;quot;. I did fine. My sophomore year of high school, I was selected to work on the SIEM project, which has now been taken over by Alex Grace. The only reason I did not continue to work on the SIEM, is because the project was assigned around the time when Covid hit. We went online, and I never touched it again. In my Junior year of high school, as well as my first year in 24PinTech, I was not very involved. I was still feeling lazy from Covid and did basically nothing. Once I started my Senior year, I really felt like I wanted to prove that I'm good enough to be remembered in the class. In the first semester I didn't do much. Once I started on the webserver, it was all over for the haters. I mastered Linux, and Nginx, and our Webserver in less than a month, fixing isbsues that even the great &amp;quot;Tyler Griego&amp;quot; could not. With. No. Experience. Enough said. I might be a little too proud...&lt;br /&gt;
&lt;br /&gt;
== Certifications ==&lt;br /&gt;
&lt;br /&gt;
* '''CompTIA A+'''&lt;br /&gt;
* Testout Linux Pro&lt;br /&gt;
* Testout Security Pro&lt;br /&gt;
* Testout PC Pro&lt;br /&gt;
&lt;br /&gt;
== Awards ==&lt;br /&gt;
&lt;br /&gt;
* First Place Gold Medalist, AZSkillsUSA - Web Design&lt;br /&gt;
* First Place Gold Medalist, AZSkillsUSA - Career Pathways Showcase (IT)&lt;br /&gt;
&lt;br /&gt;
== My Mark ==&lt;br /&gt;
&lt;br /&gt;
== Where I am ==&lt;br /&gt;
your moms house&lt;br /&gt;
&lt;br /&gt;
== Contact ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Contact Information&lt;br /&gt;
!Phone&lt;br /&gt;
!Email&lt;br /&gt;
!Other&lt;br /&gt;
|-&lt;br /&gt;
|(480) 295-0194&lt;br /&gt;
|lukechristopherson0@gmail.com&lt;br /&gt;
|Homing Pigeon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=HTTPS_with_Certbot_(LetsEncrypt)&amp;diff=1835</id>
		<title>HTTPS with Certbot (LetsEncrypt)</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=HTTPS_with_Certbot_(LetsEncrypt)&amp;diff=1835"/>
		<updated>2022-05-13T00:31:40Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
[[File:Certbot logo.png|left|thumb|231x231px]]&lt;br /&gt;
When the internet first started, all of the websites ran on an insecure port 80, which is also known as HTTP. There were quite a few issues with this, like when a packet of data would be sent to a server with sensitive information, an outside attacker could listen and take that data. HTTPS uses and encrypted protocol called [[Three Letter Acronym (TLA)|SSL]] to encrypt data being sent. You can watch this [https://www.youtube.com/watch?v=0PHCAdw6Z8w&amp;amp;ab_channel=SecurityMetrics%2CInc. video] for more information on the subject.&lt;br /&gt;
&lt;br /&gt;
By default, [[Nginx]] runs on port 80, which is insecure HTTP, this is something that should be fixed before making the site public. To enable HTTPS, every site needs its own certificate, although they can be very hard and tedious to create manually, which is why we utilize the free program Certbot! Certbot provides a very simple way to create and apply these certificates to ensure a secure connection.&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=File:Certbot_logo.png&amp;diff=1834</id>
		<title>File:Certbot logo.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=File:Certbot_logo.png&amp;diff=1834"/>
		<updated>2022-05-13T00:25:49Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;certbot logo&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=HTTPS_with_Certbot_(LetsEncrypt)&amp;diff=1833</id>
		<title>HTTPS with Certbot (LetsEncrypt)</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=HTTPS_with_Certbot_(LetsEncrypt)&amp;diff=1833"/>
		<updated>2022-05-13T00:24:44Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
When the internet first started, all of the websites ran on an insecure port 80, which is also known as HTTP. There were quite a few issues with this, like when a packet of data would be sent to a server with sensitive information, an outside attacker could listen and take that data. HTTPS uses and encrypted protocol called [[Three Letter Acronym (TLA)|SSL]] to encrypt data being sent. You can watch this [https://www.youtube.com/watch?v=0PHCAdw6Z8w&amp;amp;ab_channel=SecurityMetrics%2CInc. video] for more information on the subject.&lt;br /&gt;
&lt;br /&gt;
By default, [[Nginx]] runs on port 80, which is insecure HTTP, this is something that should be fixed before making the site public. To enable HTTPS, every site needs its own certificate, although they can be very hard and tedious to create manually, which is why we utilize the free program Certbot! Certbot is a very simple&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=HTTPS_with_Certbot_(LetsEncrypt)&amp;diff=1832</id>
		<title>HTTPS with Certbot (LetsEncrypt)</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=HTTPS_with_Certbot_(LetsEncrypt)&amp;diff=1832"/>
		<updated>2022-05-13T00:23:45Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
[[File:Certbot.png|left|thumb|126x126px]]&lt;br /&gt;
When the internet first started, all of the websites ran on an insecure port 80, which is also known as HTTP. There were quite a few issues with this, like when a packet of data would be sent to a server with sensitive information, an outside attacker could listen and take that data. HTTPS uses and encrypted protocol called [[Three Letter Acronym (TLA)|SSL]] to encrypt data being sent. You can watch this [https://www.youtube.com/watch?v=0PHCAdw6Z8w&amp;amp;ab_channel=SecurityMetrics%2CInc. video] for more information on the subject.&lt;br /&gt;
&lt;br /&gt;
By default, [[Nginx]] runs on port 80, which is insecure HTTP, this is something that should be fixed before making the site public. To enable HTTPS, every site needs its own certificate, although they can be very hard and tedious to create manually, which is why we utilize the free program Certbot! Certbot is a very simple&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Three_Letter_Acronym_(TLA)&amp;diff=1829</id>
		<title>Three Letter Acronym (TLA)</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Three_Letter_Acronym_(TLA)&amp;diff=1829"/>
		<updated>2022-05-12T23:22:56Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: added ssl to tla&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Topic ==&lt;br /&gt;
This page will be used for you to make yourself knowledgeable on a variety of tech acronyms. A wide array of acronyms, whether it be on hardware, networking, protocols, etc. These will be very important for any tech in 24Pintech.  Learn them and know them well, otherwise you will fall victim to the ether whip.&lt;br /&gt;
&lt;br /&gt;
== Cloud Computing: ==&lt;br /&gt;
'''DaaS:''' Desktop as a Service&lt;br /&gt;
&lt;br /&gt;
'''IaaS''': Infrastructure as a Service&lt;br /&gt;
&lt;br /&gt;
'''ICaaS''': Integration Capabilities as a Service&lt;br /&gt;
&lt;br /&gt;
'''NaaS''': Network as a Service&lt;br /&gt;
&lt;br /&gt;
'''PaaS''': Platform as a Service&lt;br /&gt;
&lt;br /&gt;
'''SaaS''': Software as a service&lt;br /&gt;
&lt;br /&gt;
== Hardware: ==&lt;br /&gt;
'''CLI''': Command Line Interface&lt;br /&gt;
&lt;br /&gt;
'''CMOS''': Complementary Metal-Oxide Semiconductor&lt;br /&gt;
&lt;br /&gt;
'''CPU''': Central Processing Unit&lt;br /&gt;
&lt;br /&gt;
'''CRT''': Cathode Ray Tube&lt;br /&gt;
&lt;br /&gt;
'''DIMM''': Dual In-line Memory Module&lt;br /&gt;
&lt;br /&gt;
'''GPU''': Graphics Processing Unit&lt;br /&gt;
&lt;br /&gt;
'''NAS''': Network Attached Storage&lt;br /&gt;
&lt;br /&gt;
'''NIC''': Network Interface Card&lt;br /&gt;
&lt;br /&gt;
'''POST''': Power-on Self Test&lt;br /&gt;
&lt;br /&gt;
'''PC''': Personal Computer&lt;br /&gt;
&lt;br /&gt;
'''RAM''': Random Access Memory&lt;br /&gt;
&lt;br /&gt;
'''ROM''': Read-only Memory&lt;br /&gt;
&lt;br /&gt;
'''TPM''': Trusted Platform Module&lt;br /&gt;
&lt;br /&gt;
== Hypervisor/ Virtual ==&lt;br /&gt;
'''VDI''': Virtual Desktop Infrastructure&lt;br /&gt;
&lt;br /&gt;
'''VM''': Virtual Machine&lt;br /&gt;
&lt;br /&gt;
'''VNC''': Virtual Network Computer&lt;br /&gt;
&lt;br /&gt;
'''VPN''': Virtual Private Network&lt;br /&gt;
&lt;br /&gt;
== Networking: ==&lt;br /&gt;
'''DNS''': Domain Name Service&lt;br /&gt;
&lt;br /&gt;
'''ISP''': Internet Service Provider&lt;br /&gt;
&lt;br /&gt;
'''LAN''': Local Area Network&lt;br /&gt;
&lt;br /&gt;
'''MAN''': Metropolitan Area Network&lt;br /&gt;
&lt;br /&gt;
'''UC''': Unified Communications&lt;br /&gt;
&lt;br /&gt;
'''WAN''': Wide Area Network&lt;br /&gt;
&lt;br /&gt;
== Organizations: ==&lt;br /&gt;
'''ANSI''': American National Standards Institute&lt;br /&gt;
&lt;br /&gt;
'''CCIA''': Computer and Communications Industry Association&lt;br /&gt;
&lt;br /&gt;
'''CompTIA''': Computing Technology Industry Association&lt;br /&gt;
&lt;br /&gt;
'''DEC''': Digital Equipment Corporation&lt;br /&gt;
&lt;br /&gt;
'''EIA''': Electronics Industry Alliance&lt;br /&gt;
&lt;br /&gt;
'''FCC''': Federal Communications Commission&lt;br /&gt;
&lt;br /&gt;
'''IANA''': Internet Assigned Number Authority&lt;br /&gt;
&lt;br /&gt;
'''IEEE''': Institute of Electrical and Electronics Engineers&lt;br /&gt;
&lt;br /&gt;
'''IETF''': Internet Engineering Task Force&lt;br /&gt;
&lt;br /&gt;
'''ITU-T''': International Telecommunication Union&lt;br /&gt;
&lt;br /&gt;
'''MoCA''': Multimedia over Coax Alliance&lt;br /&gt;
&lt;br /&gt;
'''OSI''': Open System Interconnect&lt;br /&gt;
&lt;br /&gt;
'''TIA''': Telecommunications Industry Alliance&lt;br /&gt;
&lt;br /&gt;
'''W3C''': World Wide Web Consortium&lt;br /&gt;
&lt;br /&gt;
== Web server ==&lt;br /&gt;
'''LTS''': Long Term Support&lt;br /&gt;
&lt;br /&gt;
== Protocol: ==&lt;br /&gt;
'''DHCP''': Dynamic Host Configuration Protocol&lt;br /&gt;
&lt;br /&gt;
'''FTP''': File Transfer Protocol&lt;br /&gt;
&lt;br /&gt;
'''HTTP''': Hypertext Transfer Protocol&lt;br /&gt;
&lt;br /&gt;
'''HTTPS''': Hypertext Transfer Protocol Secure&lt;br /&gt;
&lt;br /&gt;
'''IP''': Internet Protocol&lt;br /&gt;
&lt;br /&gt;
'''PAP''': Password Authentication Protocol&lt;br /&gt;
&lt;br /&gt;
'''PPP''': Point-to-Point Protocol&lt;br /&gt;
&lt;br /&gt;
'''SMTP''': Secure Mail Transfer Protocol&lt;br /&gt;
&lt;br /&gt;
'''TCP''': Transmission Control Protocol&lt;br /&gt;
&lt;br /&gt;
'''TCTP''': Trivial File Transfer Protocol&lt;br /&gt;
&lt;br /&gt;
== Security: ==&lt;br /&gt;
'''ACL''': Access Control List&lt;br /&gt;
&lt;br /&gt;
'''AES''': Advanced Encryption Standard&lt;br /&gt;
&lt;br /&gt;
'''DDoS''': Distributed Denial of Service&lt;br /&gt;
&lt;br /&gt;
'''DES''': Data Encryption Standard&lt;br /&gt;
&lt;br /&gt;
'''IDS''': Intrusion Detection System&lt;br /&gt;
&lt;br /&gt;
'''IPS''': Intrusion Prevention System&lt;br /&gt;
&lt;br /&gt;
'''MFA''': Multi Factor Authentication&lt;br /&gt;
&lt;br /&gt;
'''RMM''': Remote Monitoring Management&lt;br /&gt;
&lt;br /&gt;
'''SIEM''': Security Information and Event Management&lt;br /&gt;
&lt;br /&gt;
'''TFA''': Two Factor Authentication&lt;br /&gt;
&lt;br /&gt;
'''WPA''': Wi-Fi Protected Access&lt;br /&gt;
&lt;br /&gt;
'''SSL''': Secure Socket Layer&lt;br /&gt;
&lt;br /&gt;
== Misc: ==&lt;br /&gt;
'''CA''': Conditional Access&lt;br /&gt;
&lt;br /&gt;
'''IB''': Install Base&lt;br /&gt;
&lt;br /&gt;
'''PII''': Personally Identifiable Information&lt;br /&gt;
&lt;br /&gt;
'''RTT''': Round Trip Time&lt;br /&gt;
&lt;br /&gt;
'''STFW''': Search the F****ng Web&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1828</id>
		<title>Adding a New Domain or Subdomain</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1828"/>
		<updated>2022-05-12T17:26:34Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== New Domains in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Generally speaking, adding a new (website/domain/server block) is very easy in [[Nginx]]. A common misconception throughout 24PinTech is that creating a server block is difficult, to try to curb the fear, I will go over adding a new website to our specific server setup.&lt;br /&gt;
&lt;br /&gt;
==== What you need to start ====&lt;br /&gt;
&lt;br /&gt;
* Access to a working [[Nginx]] Webserver&lt;br /&gt;
* A domain with a working A record pointing to our public IP address.&lt;br /&gt;
*[[HTTPS with Certbot (LetsEncrypt)|Certbot (LetsEncrypt)]]&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
&lt;br /&gt;
==== Configuring the Domain ====&lt;br /&gt;
[[File:Namecheap 2.png|thumb|365x365px]]&lt;br /&gt;
Before beginning any work on the webserver we need to make sure that the domain is ready to be used, you need to add the A record for it. This will most likely be done by [[Bradley Chamberlain]], but there is a chance that you will sometime have to do this or he will forget how to do it, that is why I am documenting the procedure anyways.&lt;br /&gt;
&lt;br /&gt;
To start, you will log into [https://www.namecheap.com/ Namecheap] with the account that owns the domain. Once logged in you will see all of the domains that you own listed. Select &amp;quot;''Manage''&amp;quot; on the domain that you will be using. It will take you to this screen, select &amp;quot;''Advanced DNS''&amp;quot;.&lt;br /&gt;
[[File:Namecheap .png|left|thumb]]&lt;br /&gt;
After making your way to the Advanced [[DNS]] settings, you will see a screen of A records that are what points the website &amp;quot;names&amp;quot; to actual IP addresses. To configure the domain to work with our webserver, select &amp;quot;''ADD NEW RECORD''&amp;quot;, and select the &amp;quot;''A record''&amp;quot;. You will make the host the &amp;quot;@&amp;quot; symbol, and the value will be the public IP of our webserver. Make sure you save the record, and the page. Once all of this is done, you are ready to begin the creation of the server block. &lt;br /&gt;
[[File:Esxi login.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
==== Log in to the Nginx Webserver ====&lt;br /&gt;
To begin your process of adding a server block to [[Nginx]] navigate to your favorite web browser and type in the address bar, &amp;quot;''10.21.25.2&amp;quot;''. This will take you to our Valhalla [[ESXi|ESXi box]], this is our [[ESXi|ESXi box]] that hosts all of our production VMs, which is also where devloganweb lives (our Webserver). If you are an administrator on our domain you may log in with your account for the in-class computers, otherwise see a server manager or [[Bradley Chamberlain]] for root account access. Navigate to the Webserver VM and log into it using the information provided in the secret sauce.&lt;br /&gt;
&lt;br /&gt;
==== Creating the Nginx Server Block ====&lt;br /&gt;
Once you have logged into the webserver you will need to create an [[Nginx]] server block. Use the [[Linux Basics for Webserver]] page if any of the commands used are confusing to you. Make sure you have a full understanding of this process otherwise it will be a pain to debug.&lt;br /&gt;
&lt;br /&gt;
Firstly, navigate to the sites-available directory by running the command &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. This directory holds all of the [[Nginx]] website server blocks. These server blocks are what actually lets the website run on the internet. Once in the ''sites-available'' directory you will have access to view/edit all of the other website server blocks. To create a new server block for your domain, run the command &amp;lt;code&amp;gt;sudo touch ./example.org&amp;lt;/code&amp;gt; to create the file, then &amp;lt;code&amp;gt;sudo nano ./example.org&amp;lt;/code&amp;gt; to edit the file. Alternatively, you may just run the ladder command to create and edit the file. The server blocks have very specific formatting for everything to run correctly. The following is a basic server block that has been commented to increase understanding.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
     listen 80; # This is the port that Nginx will be listening on&lt;br /&gt;
     listen [::]:80; # ex. 80 = HTTP, while 443 = HTTPS. We will never use 443.&lt;br /&gt;
&lt;br /&gt;
     # If you're not going to be using a domain,&lt;br /&gt;
     # then you can replace it with an IP&lt;br /&gt;
     server_name domain.com;&lt;br /&gt;
&lt;br /&gt;
     # The root is the directory that the website files will be held in&lt;br /&gt;
     root /var/www/domain.com;&lt;br /&gt;
     index index.php index.html index.htm; # The default web page&lt;br /&gt;
&lt;br /&gt;
     location = /favicon.io {&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location = /robots.txt {&lt;br /&gt;
          allow all;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location / {&lt;br /&gt;
          try_files $uri $uri/ /index.php$args;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~ \.php$ {&lt;br /&gt;
          include snippets/fastcgi-php.conf;&lt;br /&gt;
          fastcgi_intercept_errors on;&lt;br /&gt;
          fastcgi_pass unix:/run/php/php7.4-fpm.sock; # Change this to current php version&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {&lt;br /&gt;
          expires max;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enabling the Server Block ====&lt;br /&gt;
This is the completed server config. All configs vary based on what type of website you are creating, but this should work for a basic [[WordPress]] website. [[Vim/Nano|Save and exit]] your file. Next you need to enable the site. To do this, you will run the command &amp;lt;code&amp;gt;sudo ln -s ./example.org ../sites-enabled&amp;lt;/code&amp;gt; . This command is saying to make a [https://devdojo.com/devdojo/what-is-a-symlink symbolic link] for the server config available site, to the enabled directory. This is essentially how you enable a server config in [[Nginx]]. &lt;br /&gt;
[[File:Nginx successful config.png|thumb|507x507px]]&lt;br /&gt;
Before applying the config changes, you need to run &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; to check the [[Nginx]] configuration, if this doesn't return something similar to the example picture, that means the configuration file you have just edited is faulty. This could mean many things, from forgetting a semicolon at the end of a line, to using a setting that is not allowed. This is where you must debug the file, and use those skills you have been learning. Once the test returns successful, you will run &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;. To restart the [[Nginx]] service. This will enable the website, and you can move on to the next step. &lt;br /&gt;
&lt;br /&gt;
==== Testing Working Configuration ====&lt;br /&gt;
To check that your sever block is fully functional, you need to create an actual page for the website to run. First, navigate to the websites root directory by running &amp;lt;code&amp;gt;cd /var/www/example.org&amp;lt;/code&amp;gt;. This is where all of the files that the website runs on are located. Run the command &amp;lt;code&amp;gt;sudo nano ./info.php&amp;lt;/code&amp;gt;to create and edit the information file. Once in the file, paste this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
     phpinfo();&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;Save and Exit the file by using &amp;quot;''Ctrl + O''&amp;quot;, and &amp;quot;''Ctrl + X''&amp;quot;. Now navigate to the website in the web browser by using the link: example.org/info.php. This will display all of the sensitive information regarding our webserver, make sure that once you see the page pop up, immediately delete the file from the webserver by running, &amp;lt;code&amp;gt;sudo rm ./info.php&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now the Server block is successfully set up. Congratulations.&lt;br /&gt;
&lt;br /&gt;
== New Sub-Domain in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Adding subdomains is a really easy process and doesn't change a lot from adding a normal domain. You'll just need to remember the general process from the Adding a Domain section.&lt;br /&gt;
&lt;br /&gt;
=== Subdomain Setup ===&lt;br /&gt;
The same process for adding a subdomain in [https://www.namecheap.com/ Namecheap] will be used as adding a normal domain. For the host variable, instad of using the &amp;quot;@&amp;quot; symbol, you will instead type the name of the subdomain. ex. for wiki.example.org, the host variable will be &amp;quot;wiki&amp;quot;. Remember to save the Record and the page. Then you are ready to begin the server setup.&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
To start, navigate to the &amp;lt;code&amp;gt;sites-available&amp;lt;/code&amp;gt; directory by running &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. Then, you can either copy a pre-existing configuration by running &amp;lt;code&amp;gt;sudo cp ./example.com ./subdomain.example.org&amp;lt;/code&amp;gt; or creating a new file by running &amp;lt;code&amp;gt;sudo nano subdomain.example.org&amp;lt;/code&amp;gt;. If you copied it, edit the file by running &amp;lt;code&amp;gt;sudo nano subdomain.example.org&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== What needs to be changed ====&lt;br /&gt;
The only important things that need to be changed are the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;server_name&amp;lt;/code&amp;gt; variables. Find where the variables are located, and change the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; variable to an updated path where the contents for the subdomain can be found. Generally, good practice for this is to create a new folder in the primary domains path with the name of the subdomain. So, if we were trying to create &amp;lt;code&amp;gt;subdomain.example.org&amp;lt;/code&amp;gt;, we'd create a new folder by running the command &amp;lt;code&amp;gt;sudo mkdir /var/www/example.org/subdomain&amp;lt;/code&amp;gt;. Then, we'd modify our &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; variable to look something like this:&lt;br /&gt;
 # before&lt;br /&gt;
 root /var/www/example.org;&lt;br /&gt;
 &lt;br /&gt;
 # after&lt;br /&gt;
 root /var/www/example.org/subdomain;&lt;br /&gt;
The &amp;lt;code&amp;gt;server_name&amp;lt;/code&amp;gt; variable is just as simple. Just add the subdomain prefix to the beginning of your domain:&lt;br /&gt;
 # before&lt;br /&gt;
 server_name example.org;&lt;br /&gt;
 &lt;br /&gt;
 # after&lt;br /&gt;
 server_name subdomain.example.org;&lt;br /&gt;
Once you've made the proper changes, save and quit the file. Then, run &amp;lt;code&amp;gt;cd ../sites-enabled &amp;amp;&amp;amp; sudo ln -s ../sites-available/subdomain.example.org./&amp;lt;/code&amp;gt; . Check the [[Nginx]] configuration by running &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; for a successful return. Once that is done, restart [[Nginx]] by running &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1827</id>
		<title>Adding a New Domain or Subdomain</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1827"/>
		<updated>2022-05-12T17:20:27Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== New Domains in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Generally speaking, adding a new (website/domain/server block) is very easy in [[Nginx]]. A common misconception throughout 24PinTech is that creating a server block is difficult, to try to curb the fear, I will go over adding a new website to our specific server setup.&lt;br /&gt;
&lt;br /&gt;
==== What you need to start ====&lt;br /&gt;
&lt;br /&gt;
* Access to a working [[Nginx]] Webserver&lt;br /&gt;
* A domain with a working A record pointing to our public IP address.&lt;br /&gt;
*[[HTTPS with Certbot (LetsEncrypt)|Certbot (LetsEncrypt)]]&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
&lt;br /&gt;
==== Configuring the Domain ====&lt;br /&gt;
[[File:Namecheap 2.png|thumb|365x365px]]&lt;br /&gt;
Before beginning any work on the webserver we need to make sure that the domain is ready to be used, you need to add the A record for it. This will most likely be done by [[Bradley Chamberlain]], but there is a chance that you will sometime have to do this or he will forget how to do it, that is why I am documenting the procedure anyways.&lt;br /&gt;
&lt;br /&gt;
To start, you will log into [https://www.namecheap.com/ Namecheap] with the account that owns the domain. Once logged in you will see all of the domains that you own listed. Select &amp;quot;''Manage''&amp;quot; on the domain that you will be using. It will take you to this screen, select &amp;quot;''Advanced DNS''&amp;quot;.&lt;br /&gt;
[[File:Namecheap .png|left|thumb]]&lt;br /&gt;
After making your way to the Advanced [[DNS]] settings, you will see a screen of A records that are what points the website &amp;quot;names&amp;quot; to actual IP addresses. To configure the domain to work with our webserver, select &amp;quot;''ADD NEW RECORD''&amp;quot;, and select the &amp;quot;''A record''&amp;quot;. You will make the host the &amp;quot;@&amp;quot; symbol, and the value will be the public IP of our webserver. Make sure you save the record, and the page. Once all of this is done, you are ready to begin the creation of the server block. &lt;br /&gt;
[[File:Esxi login.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
==== Log in to the Nginx Webserver ====&lt;br /&gt;
To begin your process of adding a server block to [[Nginx]] navigate to your favorite web browser and type in the address bar, &amp;quot;''10.21.25.2&amp;quot;''. This will take you to our Valhalla [[ESXi|ESXi box]], this is our [[ESXi|ESXi box]] that hosts all of our production VMs, which is also where devloganweb lives (our Webserver). If you are an administrator on our domain you may log in with your account for the in-class computers, otherwise see a server manager or [[Bradley Chamberlain]] for root account access. Navigate to the Webserver VM and log into it using the information provided in the secret sauce.&lt;br /&gt;
&lt;br /&gt;
==== Creating the Nginx Server Block ====&lt;br /&gt;
Once you have logged into the webserver you will need to create an [[Nginx]] server block. Use the [[Linux Basics for Webserver]] page if any of the commands used are confusing to you. Make sure you have a full understanding of this process otherwise it will be a pain to debug.&lt;br /&gt;
&lt;br /&gt;
Firstly, navigate to the sites-available directory by running the command &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. This directory holds all of the [[Nginx]] website server blocks. These server blocks are what actually lets the website run on the internet. Once in the ''sites-available'' directory you will have access to view/edit all of the other website server blocks. To create a new server block for your domain, run the command &amp;lt;code&amp;gt;sudo touch ./example.org&amp;lt;/code&amp;gt; to create the file, then &amp;lt;code&amp;gt;sudo nano ./example.org&amp;lt;/code&amp;gt; to edit the file. Alternatively, you may just run the ladder command to create and edit the file. The server blocks have very specific formatting for everything to run correctly. The following is a basic server block that has been commented to increase understanding.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
     listen 80; &amp;lt;code&amp;gt;&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;# This is the port that Nginx will be listening on&amp;lt;/span&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
     listen [::]:80; # ex. 80 = HTTP, while 443 = HTTPS. We will never use 443.&lt;br /&gt;
&lt;br /&gt;
     # If you're not going to be using a domain,&lt;br /&gt;
     # then you can replace it with an IP&lt;br /&gt;
     server_name domain.com;&lt;br /&gt;
&lt;br /&gt;
     # The root is the directory that the website files will be held in&lt;br /&gt;
     root /var/www/domain.com;&lt;br /&gt;
     index index.php index.html index.htm; # The default web page&lt;br /&gt;
&lt;br /&gt;
     location = /favicon.io {&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location = /robots.txt {&lt;br /&gt;
          allow all;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location / {&lt;br /&gt;
          try_files $uri $uri/ /index.php$args;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~ \.php$ {&lt;br /&gt;
          include snippets/fastcgi-php.conf;&lt;br /&gt;
          fastcgi_intercept_errors on;&lt;br /&gt;
          fastcgi_pass unix:/run/php/php7.4-fpm.sock; # Change this to current php version&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {&lt;br /&gt;
          expires max;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enabling the Server Block ====&lt;br /&gt;
This is the completed server config. All configs vary based on what type of website you are creating, but this should work for a basic [[WordPress]] website. [[Vim/Nano|Save and exit]] your file. Next you need to enable the site. To do this, you will run the command &amp;lt;code&amp;gt;sudo ln -s ./example.org ../sites-enabled&amp;lt;/code&amp;gt; . This command is saying to make a [https://devdojo.com/devdojo/what-is-a-symlink symbolic link] for the server config available site, to the enabled directory. This is essentially how you enable a server config in [[Nginx]]. &lt;br /&gt;
[[File:Nginx successful config.png|thumb|507x507px]]&lt;br /&gt;
Before applying the config changes, you need to run &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; to check the [[Nginx]] configuration, if this doesn't return something similar to the example picture, that means the configuration file you have just edited is faulty. This could mean many things, from forgetting a semicolon at the end of a line, to using a setting that is not allowed. This is where you must debug the file, and use those skills you have been learning. Once the test returns successful, you will run &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;. To restart the [[Nginx]] service. This will enable the website, and you can move on to the next step. &lt;br /&gt;
&lt;br /&gt;
==== Testing Working Configuration ====&lt;br /&gt;
To check that your sever block is fully functional, you need to create an actual page for the website to run. First, navigate to the websites root directory by running &amp;lt;code&amp;gt;cd /var/www/example.org&amp;lt;/code&amp;gt;. This is where all of the files that the website runs on are located. Run the command &amp;lt;code&amp;gt;sudo nano ./info.php&amp;lt;/code&amp;gt;to create and edit the information file. Once in the file, paste this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
     phpinfo();&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;Save and Exit the file by using &amp;quot;''Ctrl + O''&amp;quot;, and &amp;quot;''Ctrl + X''&amp;quot;. Now navigate to the website in the web browser by using the link: example.org/info.php. This will display all of the sensitive information regarding our webserver, make sure that once you see the page pop up, immediately delete the file from the webserver by running, &amp;lt;code&amp;gt;sudo rm ./info.php&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now the Server block is successfully set up. Congratulations.&lt;br /&gt;
&lt;br /&gt;
== New Sub-Domain in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Adding subdomains is a really easy process and doesn't change a lot from adding a normal domain. You'll just need to remember the general process from the Adding a Domain section.&lt;br /&gt;
&lt;br /&gt;
=== Subdomain Setup ===&lt;br /&gt;
The same process for adding a subdomain in [https://www.namecheap.com/ Namecheap] will be used as adding a normal domain. For the host variable, instad of using the &amp;quot;@&amp;quot; symbol, you will instead type the name of the subdomain. ex. for wiki.example.org, the host variable will be &amp;quot;wiki&amp;quot;. Remember to save the Record and the page. Then you are ready to begin the server setup.&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
To start, navigate to the &amp;lt;code&amp;gt;sites-available&amp;lt;/code&amp;gt; directory by running &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. Then, you can either copy a pre-existing configuration by running &amp;lt;code&amp;gt;sudo cp ./example.com ./subdomain.example.org&amp;lt;/code&amp;gt; or creating a new file by running &amp;lt;code&amp;gt;sudo nano subdomain.example.org&amp;lt;/code&amp;gt;. If you copied it, edit the file by running &amp;lt;code&amp;gt;sudo nano subdomain.example.org&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== What needs to be changed ====&lt;br /&gt;
The only important things that need to be changed are the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;server_name&amp;lt;/code&amp;gt; variables. Find where the variables are located, and change the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; variable to an updated path where the contents for the subdomain can be found. Generally, good practice for this is to create a new folder in the primary domains path with the name of the subdomain. So, if we were trying to create &amp;lt;code&amp;gt;subdomain.example.org&amp;lt;/code&amp;gt;, we'd create a new folder by running the command &amp;lt;code&amp;gt;sudo mkdir /var/www/example.org/subdomain&amp;lt;/code&amp;gt;. Then, we'd modify our &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; variable to look something like this:&lt;br /&gt;
 # before&lt;br /&gt;
 root /var/www/example.org;&lt;br /&gt;
 &lt;br /&gt;
 # after&lt;br /&gt;
 root /var/www/example.org/subdomain;&lt;br /&gt;
The &amp;lt;code&amp;gt;server_name&amp;lt;/code&amp;gt; variable is just as simple. Just add the subdomain prefix to the beginning of your domain:&lt;br /&gt;
 # before&lt;br /&gt;
 server_name example.org;&lt;br /&gt;
 &lt;br /&gt;
 # after&lt;br /&gt;
 server_name subdomain.example.org;&lt;br /&gt;
Once you've made the proper changes, save and quit the file. Then, run &amp;lt;code&amp;gt;cd ../sites-enabled &amp;amp;&amp;amp; sudo ln -s ../sites-available/subdomain.example.org./&amp;lt;/code&amp;gt; . Check the [[Nginx]] configuration by running &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; for a successful return. Once that is done, restart [[Nginx]] by running &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1826</id>
		<title>Adding a New Domain or Subdomain</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1826"/>
		<updated>2022-05-12T17:19:41Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== New Domains in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Generally speaking, adding a new (website/domain/server block) is very easy in [[Nginx]]. A common misconception throughout 24PinTech is that creating a server block is difficult, to try to curb the fear, I will go over adding a new website to our specific server setup.&lt;br /&gt;
&lt;br /&gt;
==== What you need to start ====&lt;br /&gt;
&lt;br /&gt;
* Access to a working [[Nginx]] Webserver&lt;br /&gt;
* A domain with a working A record pointing to our public IP address.&lt;br /&gt;
*[[HTTPS with Certbot (LetsEncrypt)|Certbot (LetsEncrypt)]]&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
&lt;br /&gt;
==== Configuring the Domain ====&lt;br /&gt;
[[File:Namecheap 2.png|thumb|365x365px]]&lt;br /&gt;
Before beginning any work on the webserver we need to make sure that the domain is ready to be used, you need to add the A record for it. This will most likely be done by [[Bradley Chamberlain]], but there is a chance that you will sometime have to do this or he will forget how to do it, that is why I am documenting the procedure anyways.&lt;br /&gt;
&lt;br /&gt;
To start, you will log into [https://www.namecheap.com/ Namecheap] with the account that owns the domain. Once logged in you will see all of the domains that you own listed. Select &amp;quot;''Manage''&amp;quot; on the domain that you will be using. It will take you to this screen, select &amp;quot;''Advanced DNS''&amp;quot;.&lt;br /&gt;
[[File:Namecheap .png|left|thumb]]&lt;br /&gt;
After making your way to the Advanced [[DNS]] settings, you will see a screen of A records that are what points the website &amp;quot;names&amp;quot; to actual IP addresses. To configure the domain to work with our webserver, select &amp;quot;''ADD NEW RECORD''&amp;quot;, and select the &amp;quot;''A record''&amp;quot;. You will make the host the &amp;quot;@&amp;quot; symbol, and the value will be the public IP of our webserver. Make sure you save the record, and the page. Once all of this is done, you are ready to begin the creation of the server block. &lt;br /&gt;
[[File:Esxi login.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
==== Log in to the Nginx Webserver ====&lt;br /&gt;
To begin your process of adding a server block to [[Nginx]] navigate to your favorite web browser and type in the address bar, &amp;quot;''10.21.25.2&amp;quot;''. This will take you to our Valhalla [[ESXi|ESXi box]], this is our [[ESXi|ESXi box]] that hosts all of our production VMs, which is also where devloganweb lives (our Webserver). If you are an administrator on our domain you may log in with your account for the in-class computers, otherwise see a server manager or [[Bradley Chamberlain]] for root account access. Navigate to the Webserver VM and log into it using the information provided in the secret sauce.&lt;br /&gt;
&lt;br /&gt;
==== Creating the Nginx Server Block ====&lt;br /&gt;
Once you have logged into the webserver you will need to create an [[Nginx]] server block. Use the [[Linux Basics for Webserver]] page if any of the commands used are confusing to you. Make sure you have a full understanding of this process otherwise it will be a pain to debug.&lt;br /&gt;
&lt;br /&gt;
Firstly, navigate to the sites-available directory by running the command &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. This directory holds all of the [[Nginx]] website server blocks. These server blocks are what actually lets the website run on the internet. Once in the ''sites-available'' directory you will have access to view/edit all of the other website server blocks. To create a new server block for your domain, run the command &amp;lt;code&amp;gt;sudo touch ./example.org&amp;lt;/code&amp;gt; to create the file, then &amp;lt;code&amp;gt;sudo nano ./example.org&amp;lt;/code&amp;gt; to edit the file. Alternatively, you may just run the ladder command to create and edit the file. The server blocks have very specific formatting for everything to run correctly. The following is a basic server block that has been commented to increase understanding.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
     listen 80; &amp;lt;code style=&amp;quot;color:green&amp;quot;&amp;gt;# This is the port that Nginx will be listening on&amp;lt;/code&amp;gt;&lt;br /&gt;
     listen [::]:80; # ex. 80 = HTTP, while 443 = HTTPS. We will never use 443.&lt;br /&gt;
&lt;br /&gt;
     # If you're not going to be using a domain,&lt;br /&gt;
     # then you can replace it with an IP&lt;br /&gt;
     server_name domain.com;&lt;br /&gt;
&lt;br /&gt;
     # The root is the directory that the website files will be held in&lt;br /&gt;
     root /var/www/domain.com;&lt;br /&gt;
     index index.php index.html index.htm; # The default web page&lt;br /&gt;
&lt;br /&gt;
     location = /favicon.io {&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location = /robots.txt {&lt;br /&gt;
          allow all;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location / {&lt;br /&gt;
          try_files $uri $uri/ /index.php$args;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~ \.php$ {&lt;br /&gt;
          include snippets/fastcgi-php.conf;&lt;br /&gt;
          fastcgi_intercept_errors on;&lt;br /&gt;
          fastcgi_pass unix:/run/php/php7.4-fpm.sock; # Change this to current php version&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {&lt;br /&gt;
          expires max;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enabling the Server Block ====&lt;br /&gt;
This is the completed server config. All configs vary based on what type of website you are creating, but this should work for a basic [[WordPress]] website. [[Vim/Nano|Save and exit]] your file. Next you need to enable the site. To do this, you will run the command &amp;lt;code&amp;gt;sudo ln -s ./example.org ../sites-enabled&amp;lt;/code&amp;gt; . This command is saying to make a [https://devdojo.com/devdojo/what-is-a-symlink symbolic link] for the server config available site, to the enabled directory. This is essentially how you enable a server config in [[Nginx]]. &lt;br /&gt;
[[File:Nginx successful config.png|thumb|507x507px]]&lt;br /&gt;
Before applying the config changes, you need to run &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; to check the [[Nginx]] configuration, if this doesn't return something similar to the example picture, that means the configuration file you have just edited is faulty. This could mean many things, from forgetting a semicolon at the end of a line, to using a setting that is not allowed. This is where you must debug the file, and use those skills you have been learning. Once the test returns successful, you will run &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;. To restart the [[Nginx]] service. This will enable the website, and you can move on to the next step. &lt;br /&gt;
&lt;br /&gt;
==== Testing Working Configuration ====&lt;br /&gt;
To check that your sever block is fully functional, you need to create an actual page for the website to run. First, navigate to the websites root directory by running &amp;lt;code&amp;gt;cd /var/www/example.org&amp;lt;/code&amp;gt;. This is where all of the files that the website runs on are located. Run the command &amp;lt;code&amp;gt;sudo nano ./info.php&amp;lt;/code&amp;gt;to create and edit the information file. Once in the file, paste this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
     phpinfo();&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;Save and Exit the file by using &amp;quot;''Ctrl + O''&amp;quot;, and &amp;quot;''Ctrl + X''&amp;quot;. Now navigate to the website in the web browser by using the link: example.org/info.php. This will display all of the sensitive information regarding our webserver, make sure that once you see the page pop up, immediately delete the file from the webserver by running, &amp;lt;code&amp;gt;sudo rm ./info.php&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now the Server block is successfully set up. Congratulations.&lt;br /&gt;
&lt;br /&gt;
== New Sub-Domain in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Adding subdomains is a really easy process and doesn't change a lot from adding a normal domain. You'll just need to remember the general process from the Adding a Domain section.&lt;br /&gt;
&lt;br /&gt;
=== Subdomain Setup ===&lt;br /&gt;
The same process for adding a subdomain in [https://www.namecheap.com/ Namecheap] will be used as adding a normal domain. For the host variable, instad of using the &amp;quot;@&amp;quot; symbol, you will instead type the name of the subdomain. ex. for wiki.example.org, the host variable will be &amp;quot;wiki&amp;quot;. Remember to save the Record and the page. Then you are ready to begin the server setup.&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
To start, navigate to the &amp;lt;code&amp;gt;sites-available&amp;lt;/code&amp;gt; directory by running &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. Then, you can either copy a pre-existing configuration by running &amp;lt;code&amp;gt;sudo cp ./example.com ./subdomain.example.org&amp;lt;/code&amp;gt; or creating a new file by running &amp;lt;code&amp;gt;sudo nano subdomain.example.org&amp;lt;/code&amp;gt;. If you copied it, edit the file by running &amp;lt;code&amp;gt;sudo nano subdomain.example.org&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== What needs to be changed ====&lt;br /&gt;
The only important things that need to be changed are the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;server_name&amp;lt;/code&amp;gt; variables. Find where the variables are located, and change the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; variable to an updated path where the contents for the subdomain can be found. Generally, good practice for this is to create a new folder in the primary domains path with the name of the subdomain. So, if we were trying to create &amp;lt;code&amp;gt;subdomain.example.org&amp;lt;/code&amp;gt;, we'd create a new folder by running the command &amp;lt;code&amp;gt;sudo mkdir /var/www/example.org/subdomain&amp;lt;/code&amp;gt;. Then, we'd modify our &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; variable to look something like this:&lt;br /&gt;
 # before&lt;br /&gt;
 root /var/www/example.org;&lt;br /&gt;
 &lt;br /&gt;
 # after&lt;br /&gt;
 root /var/www/example.org/subdomain;&lt;br /&gt;
The &amp;lt;code&amp;gt;server_name&amp;lt;/code&amp;gt; variable is just as simple. Just add the subdomain prefix to the beginning of your domain:&lt;br /&gt;
 # before&lt;br /&gt;
 server_name example.org;&lt;br /&gt;
 &lt;br /&gt;
 # after&lt;br /&gt;
 server_name subdomain.example.org;&lt;br /&gt;
Once you've made the proper changes, save and quit the file. Then, run &amp;lt;code&amp;gt;cd ../sites-enabled &amp;amp;&amp;amp; sudo ln -s ../sites-available/subdomain.example.org./&amp;lt;/code&amp;gt; . Check the [[Nginx]] configuration by running &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; for a successful return. Once that is done, restart [[Nginx]] by running &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1825</id>
		<title>Adding a New Domain or Subdomain</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1825"/>
		<updated>2022-05-12T17:16:20Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== New Domains in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Generally speaking, adding a new (website/domain/server block) is very easy in [[Nginx]]. A common misconception throughout 24PinTech is that creating a server block is difficult, to try to curb the fear, I will go over adding a new website to our specific server setup.&lt;br /&gt;
&lt;br /&gt;
==== What you need to start ====&lt;br /&gt;
&lt;br /&gt;
* Access to a working [[Nginx]] Webserver&lt;br /&gt;
* A domain with a working A record pointing to our public IP address.&lt;br /&gt;
*[[HTTPS with Certbot (LetsEncrypt)|Certbot (LetsEncrypt)]]&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
&lt;br /&gt;
==== Configuring the Domain ====&lt;br /&gt;
[[File:Namecheap 2.png|thumb|365x365px]]&lt;br /&gt;
Before beginning any work on the webserver we need to make sure that the domain is ready to be used, you need to add the A record for it. This will most likely be done by [[Bradley Chamberlain]], but there is a chance that you will sometime have to do this or he will forget how to do it, that is why I am documenting the procedure anyways.&lt;br /&gt;
&lt;br /&gt;
To start, you will log into [https://www.namecheap.com/ Namecheap] with the account that owns the domain. Once logged in you will see all of the domains that you own listed. Select &amp;quot;''Manage''&amp;quot; on the domain that you will be using. It will take you to this screen, select &amp;quot;''Advanced DNS''&amp;quot;.&lt;br /&gt;
[[File:Namecheap .png|left|thumb]]&lt;br /&gt;
After making your way to the Advanced [[DNS]] settings, you will see a screen of A records that are what points the website &amp;quot;names&amp;quot; to actual IP addresses. To configure the domain to work with our webserver, select &amp;quot;''ADD NEW RECORD''&amp;quot;, and select the &amp;quot;''A record''&amp;quot;. You will make the host the &amp;quot;@&amp;quot; symbol, and the value will be the public IP of our webserver. Make sure you save the record, and the page. Once all of this is done, you are ready to begin the creation of the server block. &lt;br /&gt;
[[File:Esxi login.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
==== Log in to the Nginx Webserver ====&lt;br /&gt;
To begin your process of adding a server block to [[Nginx]] navigate to your favorite web browser and type in the address bar, &amp;quot;''10.21.25.2&amp;quot;''. This will take you to our Valhalla [[ESXi|ESXi box]], this is our [[ESXi|ESXi box]] that hosts all of our production VMs, which is also where devloganweb lives (our Webserver). If you are an administrator on our domain you may log in with your account for the in-class computers, otherwise see a server manager or [[Bradley Chamberlain]] for root account access. Navigate to the Webserver VM and log into it using the information provided in the secret sauce.&lt;br /&gt;
&lt;br /&gt;
==== Creating the Nginx Server Block ====&lt;br /&gt;
Once you have logged into the webserver you will need to create an [[Nginx]] server block. Use the [[Linux Basics for Webserver]] page if any of the commands used are confusing to you. Make sure you have a full understanding of this process otherwise it will be a pain to debug.&lt;br /&gt;
&lt;br /&gt;
Firstly, navigate to the sites-available directory by running the command &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. This directory holds all of the [[Nginx]] website server blocks. These server blocks are what actually lets the website run on the internet. Once in the ''sites-available'' directory you will have access to view/edit all of the other website server blocks. To create a new server block for your domain, run the command &amp;lt;code&amp;gt;sudo touch ./example.org&amp;lt;/code&amp;gt; to create the file, then &amp;lt;code&amp;gt;sudo nano ./example.org&amp;lt;/code&amp;gt; to edit the file. Alternatively, you may just run the ladder command to create and edit the file. The server blocks have very specific formatting for everything to run correctly. The following is a basic server block that has been commented to increase understanding.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
     listen 80; &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;# This is the port that Nginx will be listening on&amp;lt;/span&amp;gt;&lt;br /&gt;
     listen [::]:80; # ex. 80 = HTTP, while 443 = HTTPS. We will never use 443.&lt;br /&gt;
&lt;br /&gt;
     # If you're not going to be using a domain,&lt;br /&gt;
     # then you can replace it with an IP&lt;br /&gt;
     server_name domain.com;&lt;br /&gt;
&lt;br /&gt;
     # The root is the directory that the website files will be held in&lt;br /&gt;
     root /var/www/domain.com;&lt;br /&gt;
     index index.php index.html index.htm; # The default web page&lt;br /&gt;
&lt;br /&gt;
     location = /favicon.io {&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location = /robots.txt {&lt;br /&gt;
          allow all;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location / {&lt;br /&gt;
          try_files $uri $uri/ /index.php$args;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~ \.php$ {&lt;br /&gt;
          include snippets/fastcgi-php.conf;&lt;br /&gt;
          fastcgi_intercept_errors on;&lt;br /&gt;
          fastcgi_pass unix:/run/php/php7.4-fpm.sock; # Change this to current php version&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {&lt;br /&gt;
          expires max;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enabling the Server Block ====&lt;br /&gt;
This is the completed server config. All configs vary based on what type of website you are creating, but this should work for a basic [[WordPress]] website. [[Vim/Nano|Save and exit]] your file. Next you need to enable the site. To do this, you will run the command &amp;lt;code&amp;gt;sudo ln -s ./example.org ../sites-enabled&amp;lt;/code&amp;gt; . This command is saying to make a [https://devdojo.com/devdojo/what-is-a-symlink symbolic link] for the server config available site, to the enabled directory. This is essentially how you enable a server config in [[Nginx]]. &lt;br /&gt;
[[File:Nginx successful config.png|thumb|507x507px]]&lt;br /&gt;
Before applying the config changes, you need to run &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; to check the [[Nginx]] configuration, if this doesn't return something similar to the example picture, that means the configuration file you have just edited is faulty. This could mean many things, from forgetting a semicolon at the end of a line, to using a setting that is not allowed. This is where you must debug the file, and use those skills you have been learning. Once the test returns successful, you will run &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;. To restart the [[Nginx]] service. This will enable the website, and you can move on to the next step. &lt;br /&gt;
&lt;br /&gt;
==== Testing Working Configuration ====&lt;br /&gt;
To check that your sever block is fully functional, you need to create an actual page for the website to run. First, navigate to the websites root directory by running &amp;lt;code&amp;gt;cd /var/www/example.org&amp;lt;/code&amp;gt;. This is where all of the files that the website runs on are located. Run the command &amp;lt;code&amp;gt;sudo nano ./info.php&amp;lt;/code&amp;gt;to create and edit the information file. Once in the file, paste this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
     phpinfo();&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;Save and Exit the file by using &amp;quot;''Ctrl + O''&amp;quot;, and &amp;quot;''Ctrl + X''&amp;quot;. Now navigate to the website in the web browser by using the link: example.org/info.php. This will display all of the sensitive information regarding our webserver, make sure that once you see the page pop up, immediately delete the file from the webserver by running, &amp;lt;code&amp;gt;sudo rm ./info.php&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now the Server block is successfully set up. Congratulations.&lt;br /&gt;
&lt;br /&gt;
== New Sub-Domain in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Adding subdomains is a really easy process and doesn't change a lot from adding a normal domain. You'll just need to remember the general process from the Adding a Domain section.&lt;br /&gt;
&lt;br /&gt;
=== Subdomain Setup ===&lt;br /&gt;
The same process for adding a subdomain in [https://www.namecheap.com/ Namecheap] will be used as adding a normal domain. For the host variable, instad of using the &amp;quot;@&amp;quot; symbol, you will instead type the name of the subdomain. ex. for wiki.example.org, the host variable will be &amp;quot;wiki&amp;quot;. Remember to save the Record and the page. Then you are ready to begin the server setup.&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
To start, navigate to the &amp;lt;code&amp;gt;sites-available&amp;lt;/code&amp;gt; directory by running &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. Then, you can either copy a pre-existing configuration by running &amp;lt;code&amp;gt;sudo cp ./example.com ./subdomain.example.org&amp;lt;/code&amp;gt; or creating a new file by running &amp;lt;code&amp;gt;sudo nano subdomain.example.org&amp;lt;/code&amp;gt;. If you copied it, edit the file by running &amp;lt;code&amp;gt;sudo nano subdomain.example.org&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== What needs to be changed ====&lt;br /&gt;
The only important things that need to be changed are the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;server_name&amp;lt;/code&amp;gt; variables. Find where the variables are located, and change the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; variable to an updated path where the contents for the subdomain can be found. Generally, good practice for this is to create a new folder in the primary domains path with the name of the subdomain. So, if we were trying to create &amp;lt;code&amp;gt;subdomain.example.org&amp;lt;/code&amp;gt;, we'd create a new folder by running the command &amp;lt;code&amp;gt;sudo mkdir /var/www/example.org/subdomain&amp;lt;/code&amp;gt;. Then, we'd modify our &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; variable to look something like this:&lt;br /&gt;
 # before&lt;br /&gt;
 root /var/www/example.org;&lt;br /&gt;
 &lt;br /&gt;
 # after&lt;br /&gt;
 root /var/www/example.org/subdomain;&lt;br /&gt;
The &amp;lt;code&amp;gt;server_name&amp;lt;/code&amp;gt; variable is just as simple. Just add the subdomain prefix to the beginning of your domain:&lt;br /&gt;
 # before&lt;br /&gt;
 server_name example.org;&lt;br /&gt;
 &lt;br /&gt;
 # after&lt;br /&gt;
 server_name subdomain.example.org;&lt;br /&gt;
Once you've made the proper changes, save and quit the file. Then, run &amp;lt;code&amp;gt;cd ../sites-enabled &amp;amp;&amp;amp; sudo ln -s ../sites-available/subdomain.example.org./&amp;lt;/code&amp;gt; . Check the [[Nginx]] configuration by running &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; for a successful return. Once that is done, restart [[Nginx]] by running &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1824</id>
		<title>Adding a New Domain or Subdomain</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1824"/>
		<updated>2022-05-12T17:14:06Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== New Domains in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Generally speaking, adding a new (website/domain/server block) is very easy in [[Nginx]]. A common misconception throughout 24PinTech is that creating a server block is difficult, to try to curb the fear, I will go over adding a new website to our specific server setup.&lt;br /&gt;
&lt;br /&gt;
==== What you need to start ====&lt;br /&gt;
&lt;br /&gt;
* Access to a working [[Nginx]] Webserver&lt;br /&gt;
* A domain with a working A record pointing to our public IP address.&lt;br /&gt;
*[[HTTPS with Certbot (LetsEncrypt)|Certbot (LetsEncrypt)]]&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
&lt;br /&gt;
==== Configuring the Domain ====&lt;br /&gt;
[[File:Namecheap 2.png|thumb|365x365px]]&lt;br /&gt;
Before beginning any work on the webserver we need to make sure that the domain is ready to be used, you need to add the A record for it. This will most likely be done by [[Bradley Chamberlain]], but there is a chance that you will sometime have to do this or he will forget how to do it, that is why I am documenting the procedure anyways.&lt;br /&gt;
&lt;br /&gt;
To start, you will log into [https://www.namecheap.com/ Namecheap] with the account that owns the domain. Once logged in you will see all of the domains that you own listed. Select &amp;quot;''Manage''&amp;quot; on the domain that you will be using. It will take you to this screen, select &amp;quot;''Advanced DNS''&amp;quot;.&lt;br /&gt;
[[File:Namecheap .png|left|thumb]]&lt;br /&gt;
After making your way to the Advanced [[DNS]] settings, you will see a screen of A records that are what points the website &amp;quot;names&amp;quot; to actual IP addresses. To configure the domain to work with our webserver, select &amp;quot;''ADD NEW RECORD''&amp;quot;, and select the &amp;quot;''A record''&amp;quot;. You will make the host the &amp;quot;@&amp;quot; symbol, and the value will be the public IP of our webserver. Make sure you save the record, and the page. Once all of this is done, you are ready to begin the creation of the server block. &lt;br /&gt;
[[File:Esxi login.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
==== Log in to the Nginx Webserver ====&lt;br /&gt;
To begin your process of adding a server block to [[Nginx]] navigate to your favorite web browser and type in the address bar, &amp;quot;''10.21.25.2&amp;quot;''. This will take you to our Valhalla [[ESXi|ESXi box]], this is our [[ESXi|ESXi box]] that hosts all of our production VMs, which is also where devloganweb lives (our Webserver). If you are an administrator on our domain you may log in with your account for the in-class computers, otherwise see a server manager or [[Bradley Chamberlain]] for root account access. Navigate to the Webserver VM and log into it using the information provided in the secret sauce.&lt;br /&gt;
&lt;br /&gt;
==== Creating the Nginx Server Block ====&lt;br /&gt;
Once you have logged into the webserver you will need to create an [[Nginx]] server block. Use the [[Linux Basics for Webserver]] page if any of the commands used are confusing to you. Make sure you have a full understanding of this process otherwise it will be a pain to debug.&lt;br /&gt;
&lt;br /&gt;
Firstly, navigate to the sites-available directory by running the command &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. This directory holds all of the [[Nginx]] website server blocks. These server blocks are what actually lets the website run on the internet. Once in the ''sites-available'' directory you will have access to view/edit all of the other website server blocks. To create a new server block for your domain, run the command &amp;lt;code&amp;gt;sudo touch ./example.org&amp;lt;/code&amp;gt; to create the file, then &amp;lt;code&amp;gt;sudo nano ./example.org&amp;lt;/code&amp;gt; to edit the file. Alternatively, you may just run the ladder command to create and edit the file. The server blocks have very specific formatting for everything to run correctly. The following is a basic server block that has been commented to increase understanding.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
     listen 80; &amp;lt;style=&amp;quot;color:green&amp;quot;&amp;gt;# This is the port that Nginx will be listening on&lt;br /&gt;
     listen [::]:80; # ex. 80 = HTTP, while 443 = HTTPS. We will never use 443.&lt;br /&gt;
&lt;br /&gt;
     # If you're not going to be using a domain,&lt;br /&gt;
     # then you can replace it with an IP&lt;br /&gt;
     server_name domain.com;&lt;br /&gt;
&lt;br /&gt;
     # The root is the directory that the website files will be held in&lt;br /&gt;
     root /var/www/domain.com;&lt;br /&gt;
     index index.php index.html index.htm; # The default web page&lt;br /&gt;
&lt;br /&gt;
     location = /favicon.io {&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location = /robots.txt {&lt;br /&gt;
          allow all;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location / {&lt;br /&gt;
          try_files $uri $uri/ /index.php$args;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~ \.php$ {&lt;br /&gt;
          include snippets/fastcgi-php.conf;&lt;br /&gt;
          fastcgi_intercept_errors on;&lt;br /&gt;
          fastcgi_pass unix:/run/php/php7.4-fpm.sock; # Change this to current php version&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {&lt;br /&gt;
          expires max;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enabling the Server Block ====&lt;br /&gt;
This is the completed server config. All configs vary based on what type of website you are creating, but this should work for a basic [[WordPress]] website. [[Vim/Nano|Save and exit]] your file. Next you need to enable the site. To do this, you will run the command &amp;lt;code&amp;gt;sudo ln -s ./example.org ../sites-enabled&amp;lt;/code&amp;gt; . This command is saying to make a [https://devdojo.com/devdojo/what-is-a-symlink symbolic link] for the server config available site, to the enabled directory. This is essentially how you enable a server config in [[Nginx]]. &lt;br /&gt;
[[File:Nginx successful config.png|thumb|507x507px]]&lt;br /&gt;
Before applying the config changes, you need to run &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; to check the [[Nginx]] configuration, if this doesn't return something similar to the example picture, that means the configuration file you have just edited is faulty. This could mean many things, from forgetting a semicolon at the end of a line, to using a setting that is not allowed. This is where you must debug the file, and use those skills you have been learning. Once the test returns successful, you will run &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;. To restart the [[Nginx]] service. This will enable the website, and you can move on to the next step. &lt;br /&gt;
&lt;br /&gt;
==== Testing Working Configuration ====&lt;br /&gt;
To check that your sever block is fully functional, you need to create an actual page for the website to run. First, navigate to the websites root directory by running &amp;lt;code&amp;gt;cd /var/www/example.org&amp;lt;/code&amp;gt;. This is where all of the files that the website runs on are located. Run the command &amp;lt;code&amp;gt;sudo nano ./info.php&amp;lt;/code&amp;gt;to create and edit the information file. Once in the file, paste this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
     phpinfo();&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;Save and Exit the file by using &amp;quot;''Ctrl + O''&amp;quot;, and &amp;quot;''Ctrl + X''&amp;quot;. Now navigate to the website in the web browser by using the link: example.org/info.php. This will display all of the sensitive information regarding our webserver, make sure that once you see the page pop up, immediately delete the file from the webserver by running, &amp;lt;code&amp;gt;sudo rm ./info.php&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now the Server block is successfully set up. Congratulations.&lt;br /&gt;
&lt;br /&gt;
== New Sub-Domain in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Adding subdomains is a really easy process and doesn't change a lot from adding a normal domain. You'll just need to remember the general process from the Adding a Domain section.&lt;br /&gt;
&lt;br /&gt;
=== Subdomain Setup ===&lt;br /&gt;
The same process for adding a subdomain in [https://www.namecheap.com/ Namecheap] will be used as adding a normal domain. For the host variable, instad of using the &amp;quot;@&amp;quot; symbol, you will instead type the name of the subdomain. ex. for wiki.example.org, the host variable will be &amp;quot;wiki&amp;quot;. Remember to save the Record and the page. Then you are ready to begin the server setup.&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
To start, navigate to the &amp;lt;code&amp;gt;sites-available&amp;lt;/code&amp;gt; directory by running &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. Then, you can either copy a pre-existing configuration by running &amp;lt;code&amp;gt;sudo cp ./example.com ./subdomain.example.org&amp;lt;/code&amp;gt; or creating a new file by running &amp;lt;code&amp;gt;sudo nano subdomain.example.org&amp;lt;/code&amp;gt;. If you copied it, edit the file by running &amp;lt;code&amp;gt;sudo nano subdomain.example.org&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== What needs to be changed ====&lt;br /&gt;
The only important things that need to be changed are the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;server_name&amp;lt;/code&amp;gt; variables. Find where the variables are located, and change the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; variable to an updated path where the contents for the subdomain can be found. Generally, good practice for this is to create a new folder in the primary domains path with the name of the subdomain. So, if we were trying to create &amp;lt;code&amp;gt;subdomain.example.org&amp;lt;/code&amp;gt;, we'd create a new folder by running the command &amp;lt;code&amp;gt;sudo mkdir /var/www/example.org/subdomain&amp;lt;/code&amp;gt;. Then, we'd modify our &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; variable to look something like this:&lt;br /&gt;
 # before&lt;br /&gt;
 root /var/www/example.org;&lt;br /&gt;
 &lt;br /&gt;
 # after&lt;br /&gt;
 root /var/www/example.org/subdomain;&lt;br /&gt;
The &amp;lt;code&amp;gt;server_name&amp;lt;/code&amp;gt; variable is just as simple. Just add the subdomain prefix to the beginning of your domain:&lt;br /&gt;
 # before&lt;br /&gt;
 server_name example.org;&lt;br /&gt;
 &lt;br /&gt;
 # after&lt;br /&gt;
 server_name subdomain.example.org;&lt;br /&gt;
Once you've made the proper changes, save and quit the file. Then, run &amp;lt;code&amp;gt;cd ../sites-enabled &amp;amp;&amp;amp; sudo ln -s ../sites-available/subdomain.example.org./&amp;lt;/code&amp;gt; . Check the [[Nginx]] configuration by running &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; for a successful return. Once that is done, restart [[Nginx]] by running &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1823</id>
		<title>Adding a New Domain or Subdomain</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1823"/>
		<updated>2022-05-12T17:12:40Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== New Domains in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Generally speaking, adding a new (website/domain/server block) is very easy in [[Nginx]]. A common misconception throughout 24PinTech is that creating a server block is difficult, to try to curb the fear, I will go over adding a new website to our specific server setup.&lt;br /&gt;
&lt;br /&gt;
==== What you need to start ====&lt;br /&gt;
&lt;br /&gt;
* Access to a working [[Nginx]] Webserver&lt;br /&gt;
* A domain with a working A record pointing to our public IP address.&lt;br /&gt;
*[[HTTPS with Certbot (LetsEncrypt)|Certbot (LetsEncrypt)]]&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
&lt;br /&gt;
==== Configuring the Domain ====&lt;br /&gt;
[[File:Namecheap 2.png|thumb|365x365px]]&lt;br /&gt;
Before beginning any work on the webserver we need to make sure that the domain is ready to be used, you need to add the A record for it. This will most likely be done by [[Bradley Chamberlain]], but there is a chance that you will sometime have to do this or he will forget how to do it, that is why I am documenting the procedure anyways.&lt;br /&gt;
&lt;br /&gt;
To start, you will log into [https://www.namecheap.com/ Namecheap] with the account that owns the domain. Once logged in you will see all of the domains that you own listed. Select &amp;quot;''Manage''&amp;quot; on the domain that you will be using. It will take you to this screen, select &amp;quot;''Advanced DNS''&amp;quot;.&lt;br /&gt;
[[File:Namecheap .png|left|thumb]]&lt;br /&gt;
After making your way to the Advanced [[DNS]] settings, you will see a screen of A records that are what points the website &amp;quot;names&amp;quot; to actual IP addresses. To configure the domain to work with our webserver, select &amp;quot;''ADD NEW RECORD''&amp;quot;, and select the &amp;quot;''A record''&amp;quot;. You will make the host the &amp;quot;@&amp;quot; symbol, and the value will be the public IP of our webserver. Make sure you save the record, and the page. Once all of this is done, you are ready to begin the creation of the server block. &lt;br /&gt;
[[File:Esxi login.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
==== Log in to the Nginx Webserver ====&lt;br /&gt;
To begin your process of adding a server block to [[Nginx]] navigate to your favorite web browser and type in the address bar, &amp;quot;''10.21.25.2&amp;quot;''. This will take you to our Valhalla [[ESXi|ESXi box]], this is our [[ESXi|ESXi box]] that hosts all of our production VMs, which is also where devloganweb lives (our Webserver). If you are an administrator on our domain you may log in with your account for the in-class computers, otherwise see a server manager or [[Bradley Chamberlain]] for root account access. Navigate to the Webserver VM and log into it using the information provided in the secret sauce.&lt;br /&gt;
&lt;br /&gt;
==== Creating the Nginx Server Block ====&lt;br /&gt;
Once you have logged into the webserver you will need to create an [[Nginx]] server block. Use the [[Linux Basics for Webserver]] page if any of the commands used are confusing to you. Make sure you have a full understanding of this process otherwise it will be a pain to debug.&lt;br /&gt;
&lt;br /&gt;
Firstly, navigate to the sites-available directory by running the command &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. This directory holds all of the [[Nginx]] website server blocks. These server blocks are what actually lets the website run on the internet. Once in the ''sites-available'' directory you will have access to view/edit all of the other website server blocks. To create a new server block for your domain, run the command &amp;lt;code&amp;gt;sudo touch ./example.org&amp;lt;/code&amp;gt; to create the file, then &amp;lt;code&amp;gt;sudo nano ./example.org&amp;lt;/code&amp;gt; to edit the file. Alternatively, you may just run the ladder command to create and edit the file. The server blocks have very specific formatting for everything to run correctly. The following is a basic server block that has been commented to increase understanding.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
     listen 80;&amp;lt;/pre&amp;gt; &amp;lt;pre style=&amp;quot;color:green&amp;quot;&amp;gt;# This is the port that Nginx will be listening on&amp;lt;/pre&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
     listen [::]:80; # ex. 80 = HTTP, while 443 = HTTPS. We will never use 443.&lt;br /&gt;
&lt;br /&gt;
     # If you're not going to be using a domain,&lt;br /&gt;
     # then you can replace it with an IP&lt;br /&gt;
     server_name domain.com;&lt;br /&gt;
&lt;br /&gt;
     # The root is the directory that the website files will be held in&lt;br /&gt;
     root /var/www/domain.com;&lt;br /&gt;
     index index.php index.html index.htm; # The default web page&lt;br /&gt;
&lt;br /&gt;
     location = /favicon.io {&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location = /robots.txt {&lt;br /&gt;
          allow all;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location / {&lt;br /&gt;
          try_files $uri $uri/ /index.php$args;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~ \.php$ {&lt;br /&gt;
          include snippets/fastcgi-php.conf;&lt;br /&gt;
          fastcgi_intercept_errors on;&lt;br /&gt;
          fastcgi_pass unix:/run/php/php7.4-fpm.sock; # Change this to current php version&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {&lt;br /&gt;
          expires max;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enabling the Server Block ====&lt;br /&gt;
This is the completed server config. All configs vary based on what type of website you are creating, but this should work for a basic [[WordPress]] website. [[Vim/Nano|Save and exit]] your file. Next you need to enable the site. To do this, you will run the command &amp;lt;code&amp;gt;sudo ln -s ./example.org ../sites-enabled&amp;lt;/code&amp;gt; . This command is saying to make a [https://devdojo.com/devdojo/what-is-a-symlink symbolic link] for the server config available site, to the enabled directory. This is essentially how you enable a server config in [[Nginx]]. &lt;br /&gt;
[[File:Nginx successful config.png|thumb|507x507px]]&lt;br /&gt;
Before applying the config changes, you need to run &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; to check the [[Nginx]] configuration, if this doesn't return something similar to the example picture, that means the configuration file you have just edited is faulty. This could mean many things, from forgetting a semicolon at the end of a line, to using a setting that is not allowed. This is where you must debug the file, and use those skills you have been learning. Once the test returns successful, you will run &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;. To restart the [[Nginx]] service. This will enable the website, and you can move on to the next step. &lt;br /&gt;
&lt;br /&gt;
==== Testing Working Configuration ====&lt;br /&gt;
To check that your sever block is fully functional, you need to create an actual page for the website to run. First, navigate to the websites root directory by running &amp;lt;code&amp;gt;cd /var/www/example.org&amp;lt;/code&amp;gt;. This is where all of the files that the website runs on are located. Run the command &amp;lt;code&amp;gt;sudo nano ./info.php&amp;lt;/code&amp;gt;to create and edit the information file. Once in the file, paste this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
     phpinfo();&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;Save and Exit the file by using &amp;quot;''Ctrl + O''&amp;quot;, and &amp;quot;''Ctrl + X''&amp;quot;. Now navigate to the website in the web browser by using the link: example.org/info.php. This will display all of the sensitive information regarding our webserver, make sure that once you see the page pop up, immediately delete the file from the webserver by running, &amp;lt;code&amp;gt;sudo rm ./info.php&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now the Server block is successfully set up. Congratulations.&lt;br /&gt;
&lt;br /&gt;
== New Sub-Domain in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Adding subdomains is a really easy process and doesn't change a lot from adding a normal domain. You'll just need to remember the general process from the Adding a Domain section.&lt;br /&gt;
&lt;br /&gt;
=== Subdomain Setup ===&lt;br /&gt;
The same process for adding a subdomain in [https://www.namecheap.com/ Namecheap] will be used as adding a normal domain. For the host variable, instad of using the &amp;quot;@&amp;quot; symbol, you will instead type the name of the subdomain. ex. for wiki.example.org, the host variable will be &amp;quot;wiki&amp;quot;. Remember to save the Record and the page. Then you are ready to begin the server setup.&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
To start, navigate to the &amp;lt;code&amp;gt;sites-available&amp;lt;/code&amp;gt; directory by running &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. Then, you can either copy a pre-existing configuration by running &amp;lt;code&amp;gt;sudo cp ./example.com ./subdomain.example.org&amp;lt;/code&amp;gt; or creating a new file by running &amp;lt;code&amp;gt;sudo nano subdomain.example.org&amp;lt;/code&amp;gt;. If you copied it, edit the file by running &amp;lt;code&amp;gt;sudo nano subdomain.example.org&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== What needs to be changed ====&lt;br /&gt;
The only important things that need to be changed are the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;server_name&amp;lt;/code&amp;gt; variables. Find where the variables are located, and change the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; variable to an updated path where the contents for the subdomain can be found. Generally, good practice for this is to create a new folder in the primary domains path with the name of the subdomain. So, if we were trying to create &amp;lt;code&amp;gt;subdomain.example.org&amp;lt;/code&amp;gt;, we'd create a new folder by running the command &amp;lt;code&amp;gt;sudo mkdir /var/www/example.org/subdomain&amp;lt;/code&amp;gt;. Then, we'd modify our &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; variable to look something like this:&lt;br /&gt;
 # before&lt;br /&gt;
 root /var/www/example.org;&lt;br /&gt;
 &lt;br /&gt;
 # after&lt;br /&gt;
 root /var/www/example.org/subdomain;&lt;br /&gt;
The &amp;lt;code&amp;gt;server_name&amp;lt;/code&amp;gt; variable is just as simple. Just add the subdomain prefix to the beginning of your domain:&lt;br /&gt;
 # before&lt;br /&gt;
 server_name example.org;&lt;br /&gt;
 &lt;br /&gt;
 # after&lt;br /&gt;
 server_name subdomain.example.org;&lt;br /&gt;
Once you've made the proper changes, save and quit the file. Then, run &amp;lt;code&amp;gt;cd ../sites-enabled &amp;amp;&amp;amp; sudo ln -s ../sites-available/subdomain.example.org./&amp;lt;/code&amp;gt; . Check the [[Nginx]] configuration by running &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; for a successful return. Once that is done, restart [[Nginx]] by running &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1822</id>
		<title>Adding a New Domain or Subdomain</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1822"/>
		<updated>2022-05-12T17:12:06Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== New Domains in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Generally speaking, adding a new (website/domain/server block) is very easy in [[Nginx]]. A common misconception throughout 24PinTech is that creating a server block is difficult, to try to curb the fear, I will go over adding a new website to our specific server setup.&lt;br /&gt;
&lt;br /&gt;
==== What you need to start ====&lt;br /&gt;
&lt;br /&gt;
* Access to a working [[Nginx]] Webserver&lt;br /&gt;
* A domain with a working A record pointing to our public IP address.&lt;br /&gt;
*[[HTTPS with Certbot (LetsEncrypt)|Certbot (LetsEncrypt)]]&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
&lt;br /&gt;
==== Configuring the Domain ====&lt;br /&gt;
[[File:Namecheap 2.png|thumb|365x365px]]&lt;br /&gt;
Before beginning any work on the webserver we need to make sure that the domain is ready to be used, you need to add the A record for it. This will most likely be done by [[Bradley Chamberlain]], but there is a chance that you will sometime have to do this or he will forget how to do it, that is why I am documenting the procedure anyways.&lt;br /&gt;
&lt;br /&gt;
To start, you will log into [https://www.namecheap.com/ Namecheap] with the account that owns the domain. Once logged in you will see all of the domains that you own listed. Select &amp;quot;''Manage''&amp;quot; on the domain that you will be using. It will take you to this screen, select &amp;quot;''Advanced DNS''&amp;quot;.&lt;br /&gt;
[[File:Namecheap .png|left|thumb]]&lt;br /&gt;
After making your way to the Advanced [[DNS]] settings, you will see a screen of A records that are what points the website &amp;quot;names&amp;quot; to actual IP addresses. To configure the domain to work with our webserver, select &amp;quot;''ADD NEW RECORD''&amp;quot;, and select the &amp;quot;''A record''&amp;quot;. You will make the host the &amp;quot;@&amp;quot; symbol, and the value will be the public IP of our webserver. Make sure you save the record, and the page. Once all of this is done, you are ready to begin the creation of the server block. &lt;br /&gt;
[[File:Esxi login.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
==== Log in to the Nginx Webserver ====&lt;br /&gt;
To begin your process of adding a server block to [[Nginx]] navigate to your favorite web browser and type in the address bar, &amp;quot;''10.21.25.2&amp;quot;''. This will take you to our Valhalla [[ESXi|ESXi box]], this is our [[ESXi|ESXi box]] that hosts all of our production VMs, which is also where devloganweb lives (our Webserver). If you are an administrator on our domain you may log in with your account for the in-class computers, otherwise see a server manager or [[Bradley Chamberlain]] for root account access. Navigate to the Webserver VM and log into it using the information provided in the secret sauce.&lt;br /&gt;
&lt;br /&gt;
==== Creating the Nginx Server Block ====&lt;br /&gt;
Once you have logged into the webserver you will need to create an [[Nginx]] server block. Use the [[Linux Basics for Webserver]] page if any of the commands used are confusing to you. Make sure you have a full understanding of this process otherwise it will be a pain to debug.&lt;br /&gt;
&lt;br /&gt;
Firstly, navigate to the sites-available directory by running the command &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. This directory holds all of the [[Nginx]] website server blocks. These server blocks are what actually lets the website run on the internet. Once in the ''sites-available'' directory you will have access to view/edit all of the other website server blocks. To create a new server block for your domain, run the command &amp;lt;code&amp;gt;sudo touch ./example.org&amp;lt;/code&amp;gt; to create the file, then &amp;lt;code&amp;gt;sudo nano ./example.org&amp;lt;/code&amp;gt; to edit the file. Alternatively, you may just run the ladder command to create and edit the file. The server blocks have very specific formatting for everything to run correctly. The following is a basic server block that has been commented to increase understanding.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
     listen 80; &amp;lt;pre style=&amp;quot;color:green&amp;quot;&amp;gt;# This is the port that Nginx will be listening on&amp;lt;/pre&amp;gt;&lt;br /&gt;
     listen [::]:80; # ex. 80 = HTTP, while 443 = HTTPS. We will never use 443.&lt;br /&gt;
&lt;br /&gt;
     # If you're not going to be using a domain,&lt;br /&gt;
     # then you can replace it with an IP&lt;br /&gt;
     server_name domain.com;&lt;br /&gt;
&lt;br /&gt;
     # The root is the directory that the website files will be held in&lt;br /&gt;
     root /var/www/domain.com;&lt;br /&gt;
     index index.php index.html index.htm; # The default web page&lt;br /&gt;
&lt;br /&gt;
     location = /favicon.io {&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location = /robots.txt {&lt;br /&gt;
          allow all;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location / {&lt;br /&gt;
          try_files $uri $uri/ /index.php$args;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~ \.php$ {&lt;br /&gt;
          include snippets/fastcgi-php.conf;&lt;br /&gt;
          fastcgi_intercept_errors on;&lt;br /&gt;
          fastcgi_pass unix:/run/php/php7.4-fpm.sock; # Change this to current php version&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {&lt;br /&gt;
          expires max;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enabling the Server Block ====&lt;br /&gt;
This is the completed server config. All configs vary based on what type of website you are creating, but this should work for a basic [[WordPress]] website. [[Vim/Nano|Save and exit]] your file. Next you need to enable the site. To do this, you will run the command &amp;lt;code&amp;gt;sudo ln -s ./example.org ../sites-enabled&amp;lt;/code&amp;gt; . This command is saying to make a [https://devdojo.com/devdojo/what-is-a-symlink symbolic link] for the server config available site, to the enabled directory. This is essentially how you enable a server config in [[Nginx]]. &lt;br /&gt;
[[File:Nginx successful config.png|thumb|507x507px]]&lt;br /&gt;
Before applying the config changes, you need to run &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; to check the [[Nginx]] configuration, if this doesn't return something similar to the example picture, that means the configuration file you have just edited is faulty. This could mean many things, from forgetting a semicolon at the end of a line, to using a setting that is not allowed. This is where you must debug the file, and use those skills you have been learning. Once the test returns successful, you will run &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;. To restart the [[Nginx]] service. This will enable the website, and you can move on to the next step. &lt;br /&gt;
&lt;br /&gt;
==== Testing Working Configuration ====&lt;br /&gt;
To check that your sever block is fully functional, you need to create an actual page for the website to run. First, navigate to the websites root directory by running &amp;lt;code&amp;gt;cd /var/www/example.org&amp;lt;/code&amp;gt;. This is where all of the files that the website runs on are located. Run the command &amp;lt;code&amp;gt;sudo nano ./info.php&amp;lt;/code&amp;gt;to create and edit the information file. Once in the file, paste this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
     phpinfo();&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;Save and Exit the file by using &amp;quot;''Ctrl + O''&amp;quot;, and &amp;quot;''Ctrl + X''&amp;quot;. Now navigate to the website in the web browser by using the link: example.org/info.php. This will display all of the sensitive information regarding our webserver, make sure that once you see the page pop up, immediately delete the file from the webserver by running, &amp;lt;code&amp;gt;sudo rm ./info.php&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now the Server block is successfully set up. Congratulations.&lt;br /&gt;
&lt;br /&gt;
== New Sub-Domain in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Adding subdomains is a really easy process and doesn't change a lot from adding a normal domain. You'll just need to remember the general process from the Adding a Domain section.&lt;br /&gt;
&lt;br /&gt;
=== Subdomain Setup ===&lt;br /&gt;
The same process for adding a subdomain in [https://www.namecheap.com/ Namecheap] will be used as adding a normal domain. For the host variable, instad of using the &amp;quot;@&amp;quot; symbol, you will instead type the name of the subdomain. ex. for wiki.example.org, the host variable will be &amp;quot;wiki&amp;quot;. Remember to save the Record and the page. Then you are ready to begin the server setup.&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
To start, navigate to the &amp;lt;code&amp;gt;sites-available&amp;lt;/code&amp;gt; directory by running &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. Then, you can either copy a pre-existing configuration by running &amp;lt;code&amp;gt;sudo cp ./example.com ./subdomain.example.org&amp;lt;/code&amp;gt; or creating a new file by running &amp;lt;code&amp;gt;sudo nano subdomain.example.org&amp;lt;/code&amp;gt;. If you copied it, edit the file by running &amp;lt;code&amp;gt;sudo nano subdomain.example.org&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== What needs to be changed ====&lt;br /&gt;
The only important things that need to be changed are the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;server_name&amp;lt;/code&amp;gt; variables. Find where the variables are located, and change the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; variable to an updated path where the contents for the subdomain can be found. Generally, good practice for this is to create a new folder in the primary domains path with the name of the subdomain. So, if we were trying to create &amp;lt;code&amp;gt;subdomain.example.org&amp;lt;/code&amp;gt;, we'd create a new folder by running the command &amp;lt;code&amp;gt;sudo mkdir /var/www/example.org/subdomain&amp;lt;/code&amp;gt;. Then, we'd modify our &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; variable to look something like this:&lt;br /&gt;
 # before&lt;br /&gt;
 root /var/www/example.org;&lt;br /&gt;
 &lt;br /&gt;
 # after&lt;br /&gt;
 root /var/www/example.org/subdomain;&lt;br /&gt;
The &amp;lt;code&amp;gt;server_name&amp;lt;/code&amp;gt; variable is just as simple. Just add the subdomain prefix to the beginning of your domain:&lt;br /&gt;
 # before&lt;br /&gt;
 server_name example.org;&lt;br /&gt;
 &lt;br /&gt;
 # after&lt;br /&gt;
 server_name subdomain.example.org;&lt;br /&gt;
Once you've made the proper changes, save and quit the file. Then, run &amp;lt;code&amp;gt;cd ../sites-enabled &amp;amp;&amp;amp; sudo ln -s ../sites-available/subdomain.example.org./&amp;lt;/code&amp;gt; . Check the [[Nginx]] configuration by running &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; for a successful return. Once that is done, restart [[Nginx]] by running &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1821</id>
		<title>Adding a New Domain or Subdomain</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1821"/>
		<updated>2022-05-12T17:09:38Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== New Domains in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Generally speaking, adding a new (website/domain/server block) is very easy in [[Nginx]]. A common misconception throughout 24PinTech is that creating a server block is difficult, to try to curb the fear, I will go over adding a new website to our specific server setup.&lt;br /&gt;
&lt;br /&gt;
==== What you need to start ====&lt;br /&gt;
&lt;br /&gt;
* Access to a working [[Nginx]] Webserver&lt;br /&gt;
* A domain with a working A record pointing to our public IP address.&lt;br /&gt;
*[[HTTPS with Certbot (LetsEncrypt)|Certbot (LetsEncrypt)]]&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
&lt;br /&gt;
==== Configuring the Domain ====&lt;br /&gt;
[[File:Namecheap 2.png|thumb|365x365px]]&lt;br /&gt;
Before beginning any work on the webserver we need to make sure that the domain is ready to be used, you need to add the A record for it. This will most likely be done by [[Bradley Chamberlain]], but there is a chance that you will sometime have to do this or he will forget how to do it, that is why I am documenting the procedure anyways.&lt;br /&gt;
&lt;br /&gt;
To start, you will log into [https://www.namecheap.com/ Namecheap] with the account that owns the domain. Once logged in you will see all of the domains that you own listed. Select &amp;quot;''Manage''&amp;quot; on the domain that you will be using. It will take you to this screen, select &amp;quot;''Advanced DNS''&amp;quot;.&lt;br /&gt;
[[File:Namecheap .png|left|thumb]]&lt;br /&gt;
After making your way to the Advanced [[DNS]] settings, you will see a screen of A records that are what points the website &amp;quot;names&amp;quot; to actual IP addresses. To configure the domain to work with our webserver, select &amp;quot;''ADD NEW RECORD''&amp;quot;, and select the &amp;quot;''A record''&amp;quot;. You will make the host the &amp;quot;@&amp;quot; symbol, and the value will be the public IP of our webserver. Make sure you save the record, and the page. Once all of this is done, you are ready to begin the creation of the server block. &lt;br /&gt;
[[File:Esxi login.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
==== Log in to the Nginx Webserver ====&lt;br /&gt;
To begin your process of adding a server block to [[Nginx]] navigate to your favorite web browser and type in the address bar, &amp;quot;''10.21.25.2&amp;quot;''. This will take you to our Valhalla [[ESXi|ESXi box]], this is our [[ESXi|ESXi box]] that hosts all of our production VMs, which is also where devloganweb lives (our Webserver). If you are an administrator on our domain you may log in with your account for the in-class computers, otherwise see a server manager or [[Bradley Chamberlain]] for root account access. Navigate to the Webserver VM and log into it using the information provided in the secret sauce.&lt;br /&gt;
&lt;br /&gt;
==== Creating the Nginx Server Block ====&lt;br /&gt;
Once you have logged into the webserver you will need to create an [[Nginx]] server block. Use the [[Linux Basics for Webserver]] page if any of the commands used are confusing to you. Make sure you have a full understanding of this process otherwise it will be a pain to debug.&lt;br /&gt;
&lt;br /&gt;
Firstly, navigate to the sites-available directory by running the command &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. This directory holds all of the [[Nginx]] website server blocks. These server blocks are what actually lets the website run on the internet. Once in the ''sites-available'' directory you will have access to view/edit all of the other website server blocks. To create a new server block for your domain, run the command &amp;lt;code&amp;gt;sudo touch ./example.org&amp;lt;/code&amp;gt; to create the file, then &amp;lt;code&amp;gt;sudo nano ./example.org&amp;lt;/code&amp;gt; to edit the file. Alternatively, you may just run the ladder command to create and edit the file. The server blocks have very specific formatting for everything to run correctly. The following is a basic server block that has been commented to increase understanding.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
     listen 80; # This is the port that Nginx will be listening on&lt;br /&gt;
     listen [::]:80; # ex. 80 = HTTP, while 443 = HTTPS. We will never use 443.&lt;br /&gt;
&lt;br /&gt;
     # If you're not going to be using a domain,&lt;br /&gt;
     # then you can replace it with an IP&lt;br /&gt;
     server_name domain.com;&lt;br /&gt;
&lt;br /&gt;
     # The root is the directory that the website files will be held in&lt;br /&gt;
     root /var/www/domain.com;&lt;br /&gt;
     index index.php index.html index.htm; # The default web page&lt;br /&gt;
&lt;br /&gt;
     location = /favicon.io {&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location = /robots.txt {&lt;br /&gt;
          allow all;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location / {&lt;br /&gt;
          try_files $uri $uri/ /index.php$args;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~ \.php$ {&lt;br /&gt;
          include snippets/fastcgi-php.conf;&lt;br /&gt;
          fastcgi_intercept_errors on;&lt;br /&gt;
          fastcgi_pass unix:/run/php/php7.4-fpm.sock; # Change this to current php version&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {&lt;br /&gt;
          expires max;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enabling the Server Block ====&lt;br /&gt;
This is the completed server config. All configs vary based on what type of website you are creating, but this should work for a basic [[WordPress]] website. [[Vim/Nano|Save and exit]] your file. Next you need to enable the site. To do this, you will run the command &amp;lt;code&amp;gt;sudo ln -s ./example.org ../sites-enabled&amp;lt;/code&amp;gt; . This command is saying to make a [https://devdojo.com/devdojo/what-is-a-symlink symbolic link] for the server config available site, to the enabled directory. This is essentially how you enable a server config in [[Nginx]]. &lt;br /&gt;
[[File:Nginx successful config.png|thumb|507x507px]]&lt;br /&gt;
Before applying the config changes, you need to run &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; to check the [[Nginx]] configuration, if this doesn't return something similar to the example picture, that means the configuration file you have just edited is faulty. This could mean many things, from forgetting a semicolon at the end of a line, to using a setting that is not allowed. This is where you must debug the file, and use those skills you have been learning. Once the test returns successful, you will run &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;. To restart the [[Nginx]] service. This will enable the website, and you can move on to the next step. &lt;br /&gt;
&lt;br /&gt;
==== Testing Working Configuration ====&lt;br /&gt;
To check that your sever block is fully functional, you need to create an actual page for the website to run. First, navigate to the websites root directory by running &amp;lt;code&amp;gt;cd /var/www/example.org&amp;lt;/code&amp;gt;. This is where all of the files that the website runs on are located. Run the command &amp;lt;code&amp;gt;sudo nano ./info.php&amp;lt;/code&amp;gt;to create and edit the information file. Once in the file, paste this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
     phpinfo();&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;Save and Exit the file by using &amp;quot;''Ctrl + O''&amp;quot;, and &amp;quot;''Ctrl + X''&amp;quot;. Now navigate to the website in the web browser by using the link: example.org/info.php. This will display all of the sensitive information regarding our webserver, make sure that once you see the page pop up, immediately delete the file from the webserver by running, &amp;lt;code&amp;gt;sudo rm ./info.php&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now the Server block is successfully set up. Congratulations.&lt;br /&gt;
&lt;br /&gt;
== New Sub-Domain in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Adding subdomains is a really easy process and doesn't change a lot from adding a normal domain. You'll just need to remember the general process from the Adding a Domain section.&lt;br /&gt;
&lt;br /&gt;
=== Subdomain Setup ===&lt;br /&gt;
The same process for adding a subdomain in [https://www.namecheap.com/ Namecheap] will be used as adding a normal domain. For the host variable, instad of using the &amp;quot;@&amp;quot; symbol, you will instead type the name of the subdomain. ex. for wiki.example.org, the host variable will be &amp;quot;wiki&amp;quot;. Remember to save the Record and the page. Then you are ready to begin the server setup.&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
To start, navigate to the &amp;lt;code&amp;gt;sites-available&amp;lt;/code&amp;gt; directory by running &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. Then, you can either copy a pre-existing configuration by running &amp;lt;code&amp;gt;sudo cp ./example.com ./subdomain.example.org&amp;lt;/code&amp;gt; or creating a new file by running &amp;lt;code&amp;gt;sudo nano subdomain.example.org&amp;lt;/code&amp;gt;. If you copied it, edit the file by running &amp;lt;code&amp;gt;sudo nano subdomain.example.org&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== What needs to be changed ====&lt;br /&gt;
The only important things that need to be changed are the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;server_name&amp;lt;/code&amp;gt; variables. Find where the variables are located, and change the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; variable to an updated path where the contents for the subdomain can be found. Generally, good practice for this is to create a new folder in the primary domains path with the name of the subdomain. So, if we were trying to create &amp;lt;code&amp;gt;subdomain.example.org&amp;lt;/code&amp;gt;, we'd create a new folder by running the command &amp;lt;code&amp;gt;sudo mkdir /var/www/example.org/subdomain&amp;lt;/code&amp;gt;. Then, we'd modify our &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; variable to look something like this:&lt;br /&gt;
 # before&lt;br /&gt;
 root /var/www/example.org;&lt;br /&gt;
 &lt;br /&gt;
 # after&lt;br /&gt;
 root /var/www/example.org/subdomain;&lt;br /&gt;
The &amp;lt;code&amp;gt;server_name&amp;lt;/code&amp;gt; variable is just as simple. Just add the subdomain prefix to the beginning of your domain:&lt;br /&gt;
 # before&lt;br /&gt;
 server_name example.org;&lt;br /&gt;
 &lt;br /&gt;
 # after&lt;br /&gt;
 server_name subdomain.example.org;&lt;br /&gt;
Once you've made the proper changes, save and quit the file. Then, run &amp;lt;code&amp;gt;cd ../sites-enabled &amp;amp;&amp;amp; sudo ln -s ../sites-available/subdomain.example.org./&amp;lt;/code&amp;gt; . Check the [[Nginx]] configuration by running &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; for a successful return. Once that is done, restart [[Nginx]] by running &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1820</id>
		<title>Adding a New Domain or Subdomain</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1820"/>
		<updated>2022-05-12T16:58:05Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== New Domains in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Generally speaking, adding a new (website/domain/server block) is very easy in [[Nginx]]. A common misconception throughout 24PinTech is that creating a server block is difficult, to try to curb the fear, I will go over adding a new website to our specific server setup.&lt;br /&gt;
&lt;br /&gt;
==== What you need to start ====&lt;br /&gt;
&lt;br /&gt;
* Access to a working [[Nginx]] Webserver&lt;br /&gt;
* A domain with a working A record pointing to our public IP address.&lt;br /&gt;
*[[HTTPS with Certbot (LetsEncrypt)|Certbot (LetsEncrypt)]]&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
&lt;br /&gt;
==== Configuring the Domain ====&lt;br /&gt;
[[File:Namecheap 2.png|thumb|365x365px]]&lt;br /&gt;
Before beginning any work on the webserver we need to make sure that the domain is ready to be used in unison with the webserver. This will most likely be done by [[Bradley Chamberlain]], but there is a chance that you will sometime have to do this or he will forget how to do it, that is why I am documenting the procedure anyways.&lt;br /&gt;
&lt;br /&gt;
To start, you will log into [https://www.namecheap.com/ Namecheap] with the account that owns the domain. Once logged in you will see all of the domains that you own listed. Select &amp;quot;''Manage''&amp;quot; on the domain that you will be using. It will take you to this screen, select &amp;quot;''Advanced DNS''&amp;quot;.&lt;br /&gt;
[[File:Namecheap .png|left|thumb]]&lt;br /&gt;
After making your way to the Advanced [[DNS]] settings, you will see a screen of A records that are what points the website &amp;quot;names&amp;quot; to actual IP addresses. To configure the domain to work with our webserver, select &amp;quot;''ADD NEW RECORD''&amp;quot;, and select the &amp;quot;''A record''&amp;quot;. You will make the host the &amp;quot;@&amp;quot; symbol, and the value will be the public IP of our webserver. Make sure you save the record, and the page. Once all of this is done, you are ready to begin the creation of the server block. &lt;br /&gt;
[[File:Esxi login.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
==== Log in to the Nginx Webserver ====&lt;br /&gt;
To begin your process of adding a server block to [[Nginx]] navigate to your favorite web browser and type in the address bar, &amp;quot;''10.21.25.2&amp;quot;''. This will take you to our Valhalla [[ESXi|ESXi box]], this is our [[ESXi|ESXi box]] that hosts all of our production VMs, which is also where devloganweb lives (our Webserver). If you are an administrator on our domain you may log in with your account for the in-class computers, otherwise see a server manager or [[Bradley Chamberlain]] for root account access. Navigate to the Webserver VM and log into it using the information provided in the secret sauce.&lt;br /&gt;
&lt;br /&gt;
==== Creating the Nginx Server Block ====&lt;br /&gt;
Once you have logged into the webserver you will need to create an [[Nginx]] server block. Use the [[Linux Basics for Webserver]] page if any of the commands used are confusing to you. Make sure you have a full understanding of this process otherwise it will be a pain to debug.&lt;br /&gt;
&lt;br /&gt;
Firstly, navigate to the sites-available directory by running the command &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. This directory holds all of the [[Nginx]] website server blocks. These server blocks are what actually lets the website run on the internet. Once in the ''sites-available'' directory you will have access to view/edit all of the other website server blocks. To create a new server block for your domain, run the command &amp;lt;code&amp;gt;sudo touch ./example.org&amp;lt;/code&amp;gt; to create the file, then &amp;lt;code&amp;gt;sudo nano ./example.org&amp;lt;/code&amp;gt; to edit the file. Alternatively, you may just run the ladder command to create and edit the file. The server blocks have very specific formatting for everything to run correctly. The following is a basic server block that has been commented to increase understanding.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
     listen 80; # This is the port that Nginx will be listening on&lt;br /&gt;
     listen [::]:80; # ex. 80 = HTTP, while 443 = HTTPS. We will never use 443.&lt;br /&gt;
&lt;br /&gt;
     # If you're not going to be using a domain,&lt;br /&gt;
     # then you can replace it with an IP&lt;br /&gt;
     server_name domain.com;&lt;br /&gt;
&lt;br /&gt;
     # The root is the directory that the website files will be held in&lt;br /&gt;
     root /var/www/domain.com;&lt;br /&gt;
     index index.php index.html index.htm; # The default web page&lt;br /&gt;
&lt;br /&gt;
     location = /favicon.io {&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location = /robots.txt {&lt;br /&gt;
          allow all;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location / {&lt;br /&gt;
          try_files $uri $uri/ /index.php$args;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~ \.php$ {&lt;br /&gt;
          include snippets/fastcgi-php.conf;&lt;br /&gt;
          fastcgi_intercept_errors on;&lt;br /&gt;
          fastcgi_pass unix:/run/php/php7.4-fpm.sock; # Change this to current php version&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {&lt;br /&gt;
          expires max;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enabling the Server Block ====&lt;br /&gt;
This is the completed server config. All configs vary based on what type of website you are creating, but this should work for a basic [[WordPress]] website. [[Vim/Nano|Save and exit]] your file. Next you need to enable the site. To do this, you will run the command &amp;lt;code&amp;gt;sudo ln -s ./example.org ../sites-enabled&amp;lt;/code&amp;gt; . This command is saying to make a [https://devdojo.com/devdojo/what-is-a-symlink symbolic link] for the server config available site, to the enabled directory. This is essentially how you enable a server config in [[Nginx]]. &lt;br /&gt;
[[File:Nginx successful config.png|thumb|507x507px]]&lt;br /&gt;
Before applying the config changes, you need to run &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; to check the [[Nginx]] configuration, if this doesn't return something similar to the example picture, that means the configuration file you have just edited is faulty. This could mean many things, from forgetting a semicolon at the end of a line, to using a setting that is not allowed. This is where you must debug the file, and use those skills you have been learning. Once the test returns successful, you will run &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;. To restart the [[Nginx]] service. This will enable the website, and you can move on to the next step. &lt;br /&gt;
&lt;br /&gt;
==== Testing Working Configuration ====&lt;br /&gt;
To check that your sever block is fully functional, you need to create an actual page for the website to run. First, navigate to the websites root directory by running &amp;lt;code&amp;gt;cd /var/www/example.org&amp;lt;/code&amp;gt;. This is where all of the files that the website runs on are located. Run the command &amp;lt;code&amp;gt;sudo nano ./info.php&amp;lt;/code&amp;gt;to create and edit the information file. Once in the file, paste this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
     phpinfo();&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;Save and Exit the file by using &amp;quot;''Ctrl + O''&amp;quot;, and &amp;quot;''Ctrl + X''&amp;quot;. Now navigate to the website in the web browser by using the link: example.org/info.php. This will display all of the sensitive information regarding our webserver, make sure that once you see the page pop up, immediately delete the file from the webserver by running, &amp;lt;code&amp;gt;sudo rm ./info.php&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now the Server block is successfully set up. Congratulations.&lt;br /&gt;
&lt;br /&gt;
== New Sub-Domain in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Adding subdomains is a really easy process and doesn't change a lot from adding a normal domain. You'll just need to remember the general process from the Adding a Domain section.&lt;br /&gt;
&lt;br /&gt;
=== Subdomain Setup ===&lt;br /&gt;
The same process for adding a subdomain in [https://www.namecheap.com/ Namecheap] will be used as adding a normal domain. For the host variable, instad of using the &amp;quot;@&amp;quot; symbol, you will instead type the name of the subdomain. ex. for wiki.example.org, the host variable will be &amp;quot;wiki&amp;quot;. Remember to save the Record and the page. Then you are ready to begin the server setup.&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
To start, navigate to the &amp;lt;code&amp;gt;sites-available&amp;lt;/code&amp;gt; directory by running &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. Then, you can either copy a pre-existing configuration by running &amp;lt;code&amp;gt;sudo cp ./example.com ./subdomain.example.org&amp;lt;/code&amp;gt; or creating a new file by running &amp;lt;code&amp;gt;sudo nano subdomain.example.org&amp;lt;/code&amp;gt;. If you copied it, edit the file by running &amp;lt;code&amp;gt;sudo nano subdomain.example.org&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== What needs to be changed ====&lt;br /&gt;
The only important things that need to be changed are the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;server_name&amp;lt;/code&amp;gt; variables. Find where the variables are located, and change the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; variable to an updated path where the contents for the subdomain can be found. Generally, good practice for this is to create a new folder in the primary domains path with the name of the subdomain. So, if we were trying to create &amp;lt;code&amp;gt;subdomain.example.org&amp;lt;/code&amp;gt;, we'd create a new folder by running the command &amp;lt;code&amp;gt;sudo mkdir /var/www/example.org/subdomain&amp;lt;/code&amp;gt;. Then, we'd modify our &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; variable to look something like this:&lt;br /&gt;
 # before&lt;br /&gt;
 root /var/www/example.org;&lt;br /&gt;
 &lt;br /&gt;
 # after&lt;br /&gt;
 root /var/www/example.org/subdomain;&lt;br /&gt;
The &amp;lt;code&amp;gt;server_name&amp;lt;/code&amp;gt; variable is just as simple. Just add the subdomain prefix to the beginning of your domain:&lt;br /&gt;
 # before&lt;br /&gt;
 server_name example.org;&lt;br /&gt;
 &lt;br /&gt;
 # after&lt;br /&gt;
 server_name subdomain.example.org;&lt;br /&gt;
Once you've made the proper changes, save and quit the file. Then, run &amp;lt;code&amp;gt;cd ../sites-enabled &amp;amp;&amp;amp; sudo ln -s ../sites-available/subdomain.example.org./&amp;lt;/code&amp;gt; . Check the [[Nginx]] configuration by running &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; for a successful return. Once that is done, restart [[Nginx]] by running &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1819</id>
		<title>Adding a New Domain or Subdomain</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1819"/>
		<updated>2022-05-12T16:38:34Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== New Domains in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Generally speaking, adding a new (website/domain/server block) is very easy in [[Nginx]]. A common misconception throughout 24PinTech is that creating a server block is difficult, to try to curb the fear, I will go over adding a new website to our specific server setup.&lt;br /&gt;
&lt;br /&gt;
==== What you need to start ====&lt;br /&gt;
&lt;br /&gt;
* Access to a working [[Nginx]] Webserver&lt;br /&gt;
* A domain with a working A record pointing to our public IP address.&lt;br /&gt;
*[[HTTPS with Certbot (LetsEncrypt)|Certbot (LetsEncrypt)]]&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
&lt;br /&gt;
==== Configuring the Domain ====&lt;br /&gt;
[[File:Namecheap 2.png|thumb|365x365px]]&lt;br /&gt;
Before beginning any work on the webserver we need to make sure that the domain is ready to be used in unison with the webserver. This will most likely be done by [[Bradley Chamberlain]], but there is a chance that you will sometime have to do this or he will forget how to do it, that is why I am documenting the procedure anyways.&lt;br /&gt;
&lt;br /&gt;
To start, you will log into [https://www.namecheap.com/ Namecheap] with the account that owns the domain. Once logged in you will see all of the domains that you own listed. Select &amp;quot;''Manage''&amp;quot; on the domain that you will be using. It will take you to this screen, select &amp;quot;''Advanced DNS''&amp;quot;.&lt;br /&gt;
[[File:Namecheap .png|left|thumb]]&lt;br /&gt;
After making your way to the Advanced [[DNS]] settings, you will see a screen of A records that are what points the website &amp;quot;names&amp;quot; to actual IP addresses. To configure the domain to work with our webserver, select &amp;quot;''ADD NEW RECORD''&amp;quot;, and select the &amp;quot;''A record''&amp;quot;. You will make the host the &amp;quot;@&amp;quot; symbol, and the value will be the public IP of our webserver. Make sure you save the record, and the page. Once all of this is done, you are ready to begin the creation of the server block. &lt;br /&gt;
[[File:Esxi login.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
==== Log in to the Nginx Webserver ====&lt;br /&gt;
To begin your process of adding a server block to [[Nginx]] navigate to your favorite web browser and type in the address bar, &amp;quot;''10.21.25.2&amp;quot;''. This will take you to our Valhalla [[ESXi|ESXi box]], this is our [[ESXi|ESXi box]] that hosts all of our production VMs, which is also where devloganweb lives (our Webserver). If you are an administrator on our domain you may log in with your account for the in-class computers, otherwise see a server manager or [[Bradley Chamberlain]] for root account access. Navigate to the Webserver VM and log into it using the information provided in the secret sauce.&lt;br /&gt;
&lt;br /&gt;
==== Creating the Nginx Server Block ====&lt;br /&gt;
Once you have logged into the webserver you will need to create an [[Nginx]] server block. Use the [[Linux Basics for Webserver]] page if any of the commands used are confusing to you. Make sure you have a full understanding of this process otherwise it will be a pain to debug.&lt;br /&gt;
&lt;br /&gt;
Firstly, navigate to the sites-available directory by running the command &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. This directory holds all of the [[Nginx]] website server blocks. These server blocks are what actually lets the website run on the internet. Once in the ''sites-available'' directory you will have access to view/edit all of the other website server blocks. To create a new server block for your domain, run the command &amp;lt;code&amp;gt;sudo touch ./example.org&amp;lt;/code&amp;gt; to create the file, then &amp;lt;code&amp;gt;sudo nano ./example.org&amp;lt;/code&amp;gt; to edit the file. Alternatively, you may just run the ladder command to create and edit the file. The server blocks have very specific formatting for everything to run correctly. The following is a basic server block that has been commented to increase understanding.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
     listen 80; # This is the port that Nginx will be listening on&lt;br /&gt;
     listen [::]:80; # ex. 80 = HTTP, while 443 = HTTPS. We will never use 443.&lt;br /&gt;
&lt;br /&gt;
     # If you're not going to be using a domain,&lt;br /&gt;
     # then you can replace it with an IP&lt;br /&gt;
     server_name domain.com;&lt;br /&gt;
&lt;br /&gt;
     # The root is the directory that the website files will be held in&lt;br /&gt;
     root /var/www/domain.com;&lt;br /&gt;
     index index.php index.html index.htm; # The default web page&lt;br /&gt;
&lt;br /&gt;
     location = /favicon.io {&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location = /robots.txt {&lt;br /&gt;
          allow all;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location / {&lt;br /&gt;
          try_files $uri $uri/ /index.php$args;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~ \.php$ {&lt;br /&gt;
          include snippets/fastcgi-php.conf;&lt;br /&gt;
          fastcgi_intercept_errors on;&lt;br /&gt;
          fastcgi_pass unix:/run/php/php7.4-fpm.sock; # Change this to current php version&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {&lt;br /&gt;
          expires max;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enabling the Server Block ====&lt;br /&gt;
This is the completed server config. All configs vary based on what type of website you are creating, but this should work for a basic [[WordPress]] website. [[Vim/Nano|Save and exit]] your file. Next you need to enable the site. To do this, you will run the command &amp;lt;code&amp;gt;sudo ln -s ./example.org ../sites-enabled&amp;lt;/code&amp;gt; . This command is saying to make a [https://devdojo.com/devdojo/what-is-a-symlink symbolic link] for the server config available site, to the enabled directory. This is essentially how you enable a server config in [[Nginx]]. &lt;br /&gt;
[[File:Nginx successful config.png|thumb|507x507px]]&lt;br /&gt;
Before applying the config changes, you need to run &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; to check the [[Nginx]] configuration, if this doesn't return something similar to the example picture, that means the configuration file you have just edited is faulty. This could mean many things, from forgetting a semicolon at the end of a line, to using a setting that is not allowed. This is where you must debug the file, and use those skills you have been learning. Once the test returns successful, you will run &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;. To restart the [[Nginx]] service. This will enable the website, and you can move on to the next step. &lt;br /&gt;
&lt;br /&gt;
==== Testing Working Configuration ====&lt;br /&gt;
To check that your sever block is fully functional, you need to create an actual page for the website to run. First, navigate to the websites root directory by running &amp;lt;code&amp;gt;cd /var/www/example.org&amp;lt;/code&amp;gt;. This is where all of the files that the website runs on are located. Run the command &amp;lt;code&amp;gt;sudo nano ./info.php&amp;lt;/code&amp;gt;to create and edit the information file. Once in the file, paste this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
     phpinfo();&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== New Sub-Domain in Nginx ==&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1818</id>
		<title>Adding a New Domain or Subdomain</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1818"/>
		<updated>2022-05-12T16:36:29Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== New Domains in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Generally speaking, adding a new (website/domain/server block) is very easy in [[Nginx]]. A common misconception throughout 24PinTech is that creating a server block is difficult, to try to curb the fear, I will go over adding a new website to our specific server setup.&lt;br /&gt;
&lt;br /&gt;
==== What you need to start ====&lt;br /&gt;
&lt;br /&gt;
* Access to a working [[Nginx]] Webserver&lt;br /&gt;
* A domain with a working A record pointing to our public IP address.&lt;br /&gt;
*[[HTTPS with Certbot (LetsEncrypt)|Certbot (LetsEncrypt)]]&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
&lt;br /&gt;
==== Configuring the Domain ====&lt;br /&gt;
[[File:Namecheap 2.png|thumb|365x365px]]&lt;br /&gt;
Before beginning any work on the webserver we need to make sure that the domain is ready to be used in unison with the webserver. This will most likely be done by [[Bradley Chamberlain]], but there is a chance that you will sometime have to do this or he will forget how to do it, that is why I am documenting the procedure anyways.&lt;br /&gt;
&lt;br /&gt;
To start, you will log into [https://www.namecheap.com/ Namecheap] with the account that owns the domain. Once logged in you will see all of the domains that you own listed. Select &amp;quot;''Manage''&amp;quot; on the domain that you will be using. It will take you to this screen, select &amp;quot;''Advanced DNS''&amp;quot;.&lt;br /&gt;
[[File:Namecheap .png|left|thumb]]&lt;br /&gt;
After making your way to the Advanced [[DNS]] settings, you will see a screen of A records that are what points the website &amp;quot;names&amp;quot; to actual IP addresses. To configure the domain to work with our webserver, select &amp;quot;''ADD NEW RECORD''&amp;quot;, and select the &amp;quot;''A record''&amp;quot;. You will make the host the &amp;quot;@&amp;quot; symbol, and the value will be the public IP of our webserver. Make sure you save the record, and the page. Once all of this is done, you are ready to begin the creation of the server block. &lt;br /&gt;
[[File:Esxi login.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
==== Log in to the Nginx Webserver ====&lt;br /&gt;
To begin your process of adding a server block to [[Nginx]] navigate to your favorite web browser and type in the address bar, &amp;quot;''10.21.25.2&amp;quot;''. This will take you to our Valhalla [[ESXi|ESXi box]], this is our [[ESXi|ESXi box]] that hosts all of our production VMs, which is also where devloganweb lives (our Webserver). If you are an administrator on our domain you may log in with your account for the in-class computers, otherwise see a server manager or [[Bradley Chamberlain]] for root account access. Navigate to the Webserver VM and log into it using the information provided in the secret sauce.&lt;br /&gt;
&lt;br /&gt;
==== Creating the Nginx Server Block ====&lt;br /&gt;
Once you have logged into the webserver you will need to create an [[Nginx]] server block. Use the [[Linux Basics for Webserver]] page if any of the commands used are confusing to you. Make sure you have a full understanding of this process otherwise it will be a pain to debug.&lt;br /&gt;
&lt;br /&gt;
Firstly, navigate to the sites-available directory by running the command &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. This directory holds all of the [[Nginx]] website server blocks. These server blocks are what actually lets the website run on the internet. Once in the ''sites-available'' directory you will have access to view/edit all of the other website server blocks. To create a new server block for your domain, run the command &amp;lt;code&amp;gt;sudo touch ./example.org&amp;lt;/code&amp;gt; to create the file, then &amp;lt;code&amp;gt;sudo nano ./example.org&amp;lt;/code&amp;gt; to edit the file. Alternatively, you may just run the ladder command to create and edit the file. The server blocks have very specific formatting for everything to run correctly. The following is a basic server block that has been commented to increase understanding.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
     listen 80; # This is the port that Nginx will be listening on&lt;br /&gt;
     listen [::]:80; # ex. 80 = HTTP, while 443 = HTTPS. We will never use 443.&lt;br /&gt;
&lt;br /&gt;
     # If you're not going to be using a domain,&lt;br /&gt;
     # then you can replace it with an IP&lt;br /&gt;
     server_name domain.com;&lt;br /&gt;
&lt;br /&gt;
     # The root is the directory that the website files will be held in&lt;br /&gt;
     root /var/www/domain.com;&lt;br /&gt;
     index index.php index.html index.htm; # The default web page&lt;br /&gt;
&lt;br /&gt;
     location = /favicon.io {&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location = /robots.txt {&lt;br /&gt;
          allow all;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location / {&lt;br /&gt;
          try_files $uri $uri/ /index.php$args;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~ \.php$ {&lt;br /&gt;
          include snippets/fastcgi-php.conf;&lt;br /&gt;
          fastcgi_intercept_errors on;&lt;br /&gt;
          fastcgi_pass unix:/run/php/php7.4-fpm.sock; # Change this to current php version&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {&lt;br /&gt;
          expires max;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enabling the Server Block ====&lt;br /&gt;
This is the completed server config. All configs vary based on what type of website you are creating, but this should work for a basic [[WordPress]] website. [[Vim/Nano|Save and exit]] your file. Next you need to enable the site. To do this, you will run the command &amp;lt;code&amp;gt;sudo ln -s ./example.org ../sites-enabled&amp;lt;/code&amp;gt; . This command is saying to make a [https://devdojo.com/devdojo/what-is-a-symlink symbolic link] for the server config available site, to the enabled directory. This is essentially how you enable a server config in [[Nginx]]. &lt;br /&gt;
[[File:Nginx successful config.png|thumb|507x507px]]&lt;br /&gt;
Before applying the config changes, you need to run &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; to check the [[Nginx]] configuration, if this doesn't return something similar to the example picture, that means the configuration file you have just edited is faulty. This could mean many things, from forgetting a semicolon at the end of a line, to using a setting that is not allowed. This is where you must debug the file, and use those skills you have been learning. Once the test returns successful, you will run &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;. To restart the [[Nginx]] service. This will enable the website, and you can move on to the next step. &lt;br /&gt;
&lt;br /&gt;
==== Testing Working Configuration ====&lt;br /&gt;
To check that your sever block is fully functional, you need to create an actual page for the website to run. First, navigate to the websites root directory by running &amp;lt;code&amp;gt;cd /var/www/example.org&amp;lt;/code&amp;gt;. This is where all of the files that the website runs on are located. Run the command &amp;lt;code&amp;gt;sudo nano ./info.php&amp;lt;/code&amp;gt;to create and edit the information file. Once in the file, paste this code:&lt;br /&gt;
&lt;br /&gt;
== New Sub-Domain in Nginx ==&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1817</id>
		<title>Adding a New Domain or Subdomain</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1817"/>
		<updated>2022-05-12T16:21:12Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== New Domains in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Generally speaking, adding a new (website/domain/server block) is very easy in [[Nginx]]. A common misconception throughout 24PinTech is that creating a server block is difficult, to try to curb the fear, I will go over adding a new website to our specific server setup.&lt;br /&gt;
&lt;br /&gt;
==== What you need to start ====&lt;br /&gt;
&lt;br /&gt;
* Access to a working [[Nginx]] Webserver&lt;br /&gt;
* A domain with a working A record pointing to our public IP address.&lt;br /&gt;
*[[HTTPS with Certbot (LetsEncrypt)|Certbot (LetsEncrypt)]]&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
&lt;br /&gt;
==== Configuring the Domain ====&lt;br /&gt;
[[File:Namecheap 2.png|thumb|365x365px]]&lt;br /&gt;
Before beginning any work on the webserver we need to make sure that the domain is ready to be used in unison with the webserver. This will most likely be done by [[Bradley Chamberlain]], but there is a chance that you will sometime have to do this or he will forget how to do it, that is why I am documenting the procedure anyways.&lt;br /&gt;
&lt;br /&gt;
To start, you will log into [https://www.namecheap.com/ Namecheap] with the account that owns the domain. Once logged in you will see all of the domains that you own listed. Select &amp;quot;''Manage''&amp;quot; on the domain that you will be using. It will take you to this screen, select &amp;quot;''Advanced DNS''&amp;quot;.&lt;br /&gt;
[[File:Namecheap .png|left|thumb]]&lt;br /&gt;
After making your way to the Advanced [[DNS]] settings, you will see a screen of A records that are what points the website &amp;quot;names&amp;quot; to actual IP addresses. To configure the domain to work with our webserver, select &amp;quot;''ADD NEW RECORD''&amp;quot;, and select the &amp;quot;''A record''&amp;quot;. You will make the host the &amp;quot;@&amp;quot; symbol, and the value will be the public IP of our webserver. Make sure you save the record, and the page. Once all of this is done, you are ready to begin the creation of the server block. &lt;br /&gt;
[[File:Esxi login.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
==== Log in to the Nginx Webserver ====&lt;br /&gt;
To begin your process of adding a server block to [[Nginx]] navigate to your favorite web browser and type in the address bar, &amp;quot;''10.21.25.2&amp;quot;''. This will take you to our Valhalla [[ESXi|ESXi box]], this is our [[ESXi|ESXi box]] that hosts all of our production VMs, which is also where devloganweb lives (our Webserver). If you are an administrator on our domain you may log in with your account for the in-class computers, otherwise see a server manager or [[Bradley Chamberlain]] for root account access. Navigate to the Webserver VM and log into it using the information provided in the secret sauce.&lt;br /&gt;
&lt;br /&gt;
==== Creating the Nginx Server Block ====&lt;br /&gt;
Once you have logged into the webserver you will need to create an [[Nginx]] server block. Use the [[Linux Basics for Webserver]] page if any of the commands used are confusing to you. Make sure you have a full understanding of this process otherwise it will be a pain to debug.&lt;br /&gt;
&lt;br /&gt;
Firstly, navigate to the sites-available directory by running the command &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. This directory holds all of the [[Nginx]] website server blocks. These server blocks are what actually lets the website run on the internet. Once in the ''sites-available'' directory you will have access to view/edit all of the other website server blocks. To create a new server block for your domain, run the command &amp;lt;code&amp;gt;sudo touch ./example.org&amp;lt;/code&amp;gt; to create the file, then &amp;lt;code&amp;gt;sudo nano ./example.org&amp;lt;/code&amp;gt; to edit the file. Alternatively, you may just run the ladder command to create and edit the file. The server blocks have very specific formatting for everything to run correctly. The following is a basic server block that has been commented to increase understanding.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
     listen 80; # This is the port that Nginx will be listening on&lt;br /&gt;
     listen [::]:80; # ex. 80 = HTTP, while 443 = HTTPS. We will never use 443.&lt;br /&gt;
&lt;br /&gt;
     # If you're not going to be using a domain,&lt;br /&gt;
     # then you can replace it with an IP&lt;br /&gt;
     server_name domain.com;&lt;br /&gt;
&lt;br /&gt;
     # The root is the directory that the website files will be held in&lt;br /&gt;
     root /var/www/domain.com;&lt;br /&gt;
     index index.php index.html index.htm; # The default web page&lt;br /&gt;
&lt;br /&gt;
     location = /favicon.io {&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location = /robots.txt {&lt;br /&gt;
          allow all;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location / {&lt;br /&gt;
          try_files $uri $uri/ /index.php$args;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~ \.php$ {&lt;br /&gt;
          include snippets/fastcgi-php.conf;&lt;br /&gt;
          fastcgi_intercept_errors on;&lt;br /&gt;
          fastcgi_pass unix:/run/php/php7.4-fpm.sock; # Change this to current php version&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {&lt;br /&gt;
          expires max;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enabling the Server Block ====&lt;br /&gt;
This is the completed server config. All configs vary based on what type of website you are creating, but this should work for a basic [[WordPress]] website. [[Vim/Nano|Save and exit]] your file. Next you need to enable the site. To do this, you will run the command &amp;lt;code&amp;gt;sudo ln -s ./example.org ../sites-enabled&amp;lt;/code&amp;gt; . This command is saying to make a [https://devdojo.com/devdojo/what-is-a-symlink symbolic link] for the server config available site, to the enabled directory. This is essentially how you enable a server config in [[Nginx]]. &lt;br /&gt;
[[File:Nginx successful config.png|thumb|507x507px]]&lt;br /&gt;
Before applying the config changes, you need to run &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; to check the [[Nginx]] configuration, if this doesn't return something similar to the example picture, that means the configuration file you have just edited is faulty. This could mean many things, from forgetting a semicolon at the end of a line, to using a setting that is not allowed. This is where you must debug the file, and use those skills you have been learning. Once the test returns successful, you will run &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;. To restart the [[Nginx]] service. This will enable the website, and you can move on to the next step. &lt;br /&gt;
&lt;br /&gt;
==== Testing Working Configuration ====&lt;br /&gt;
&lt;br /&gt;
== New Sub-Domain in Nginx ==&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=File:Namecheap_.png&amp;diff=1816</id>
		<title>File:Namecheap .png</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=File:Namecheap_.png&amp;diff=1816"/>
		<updated>2022-05-12T16:19:48Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;a record&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1815</id>
		<title>Adding a New Domain or Subdomain</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1815"/>
		<updated>2022-05-12T16:16:42Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== New Domains in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Generally speaking, adding a new (website/domain/server block) is very easy in [[Nginx]]. A common misconception throughout 24PinTech is that creating a server block is difficult, to try to curb the fear, I will go over adding a new website to our specific server setup.&lt;br /&gt;
&lt;br /&gt;
==== What you need to start ====&lt;br /&gt;
&lt;br /&gt;
* Access to a working [[Nginx]] Webserver&lt;br /&gt;
* A domain with a working A record pointing to our public IP address.&lt;br /&gt;
*[[HTTPS with Certbot (LetsEncrypt)|Certbot (LetsEncrypt)]]&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
&lt;br /&gt;
==== Configuring the Domain ====&lt;br /&gt;
[[File:Namecheap 2.png|thumb|365x365px]]&lt;br /&gt;
Before beginning any work on the webserver we need to make sure that the domain is ready to be used in unison with the webserver. This will most likely be done by [[Bradley Chamberlain]], but there is a chance that you will sometime have to do this or he will forget how to do it, that is why I am documenting the procedure anyways.&lt;br /&gt;
&lt;br /&gt;
To start, you will log into [https://www.namecheap.com/ Namecheap] with the account that owns the domain. Once logged in you will see all of the domains that you own listed. Select &amp;quot;''Manage''&amp;quot; on the domain that you will be using. It will take you to this screen, select &amp;quot;''Advanced DNS''&amp;quot;.&lt;br /&gt;
[[File:Namecheap 4.png|left|thumb|361x361px]]&lt;br /&gt;
After making your way to the Advanced [[DNS]] settings, you will see a screen of A records that are what points the website &amp;quot;names&amp;quot; to actual IP addresses. To configure the domain to work with our webserver, select &amp;quot;''ADD NEW RECORD''&amp;quot;, and select the &amp;quot;''A record''&amp;quot;. You will make the host the &amp;quot;@&amp;quot; symbol, and the value will be the public IP of our webserver. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Esxi login.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
==== Log in to the Nginx Webserver ====&lt;br /&gt;
To begin your process of adding a server block to [[Nginx]] navigate to your favorite web browser and type in the address bar, &amp;quot;''10.21.25.2&amp;quot;''. This will take you to our Valhalla [[ESXi|ESXi box]], this is our [[ESXi|ESXi box]] that hosts all of our production VMs, which is also where devloganweb lives (our Webserver). If you are an administrator on our domain you may log in with your account for the in-class computers, otherwise see a server manager or [[Bradley Chamberlain]] for root account access. Navigate to the Webserver VM and log into it using the information provided in the secret sauce.&lt;br /&gt;
&lt;br /&gt;
==== Creating the Nginx Server Block ====&lt;br /&gt;
Once you have logged into the webserver you will need to create an [[Nginx]] server block. Use the [[Linux Basics for Webserver]] page if any of the commands used are confusing to you. Make sure you have a full understanding of this process otherwise it will be a pain to debug.&lt;br /&gt;
&lt;br /&gt;
Firstly, navigate to the sites-available directory by running the command &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. This directory holds all of the [[Nginx]] website server blocks. These server blocks are what actually lets the website run on the internet. Once in the ''sites-available'' directory you will have access to view/edit all of the other website server blocks. To create a new server block for your domain, run the command &amp;lt;code&amp;gt;sudo touch ./example.org&amp;lt;/code&amp;gt; to create the file, then &amp;lt;code&amp;gt;sudo nano ./example.org&amp;lt;/code&amp;gt; to edit the file. Alternatively, you may just run the ladder command to create and edit the file. The server blocks have very specific formatting for everything to run correctly. The following is a basic server block that has been commented to increase understanding.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
     listen 80; # This is the port that Nginx will be listening on&lt;br /&gt;
     listen [::]:80; # ex. 80 = HTTP, while 443 = HTTPS. We will never use 443.&lt;br /&gt;
&lt;br /&gt;
     # If you're not going to be using a domain,&lt;br /&gt;
     # then you can replace it with an IP&lt;br /&gt;
     server_name domain.com;&lt;br /&gt;
&lt;br /&gt;
     # The root is the directory that the website files will be held in&lt;br /&gt;
     root /var/www/domain.com;&lt;br /&gt;
     index index.php index.html index.htm; # The default web page&lt;br /&gt;
&lt;br /&gt;
     location = /favicon.io {&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location = /robots.txt {&lt;br /&gt;
          allow all;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location / {&lt;br /&gt;
          try_files $uri $uri/ /index.php$args;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~ \.php$ {&lt;br /&gt;
          include snippets/fastcgi-php.conf;&lt;br /&gt;
          fastcgi_intercept_errors on;&lt;br /&gt;
          fastcgi_pass unix:/run/php/php7.4-fpm.sock; # Change this to current php version&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {&lt;br /&gt;
          expires max;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enabling the Server Block ====&lt;br /&gt;
This is the completed server config. All configs vary based on what type of website you are creating, but this should work for a basic [[WordPress]] website. [[Vim/Nano|Save and exit]] your file. Next you need to enable the site. To do this, you will run the command &amp;lt;code&amp;gt;sudo ln -s ./example.org ../sites-enabled&amp;lt;/code&amp;gt; . This command is saying to make a [https://devdojo.com/devdojo/what-is-a-symlink symbolic link] for the server config available site, to the enabled directory. This is essentially how you enable a server config in [[Nginx]]. &lt;br /&gt;
[[File:Nginx successful config.png|thumb|507x507px]]&lt;br /&gt;
Before applying the config changes, you need to run &amp;lt;code&amp;gt;sudo nginx -t&amp;lt;/code&amp;gt; to check the [[Nginx]] configuration, if this doesn't return something similar to the example picture, that means the configuration file you have just edited is faulty. This could mean many things, from forgetting a semicolon at the end of a line, to using a setting that is not allowed. This is where you must debug the file, and use those skills you have been learning. Once the test returns successful, you will run &amp;lt;code&amp;gt;sudo systemctl restart nginx&amp;lt;/code&amp;gt;. To restart the [[Nginx]] service. This will enable the website, and you can move on to the next step. &lt;br /&gt;
&lt;br /&gt;
==== Testing Working Configuration ====&lt;br /&gt;
&lt;br /&gt;
== New Sub-Domain in Nginx ==&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=File:Namecheap_2.png&amp;diff=1813</id>
		<title>File:Namecheap 2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=File:Namecheap_2.png&amp;diff=1813"/>
		<updated>2022-05-12T16:04:54Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;namecheap manage page&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=File:Nginx_successful_config.png&amp;diff=1812</id>
		<title>File:Nginx successful config.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=File:Nginx_successful_config.png&amp;diff=1812"/>
		<updated>2022-05-12T15:52:50Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;successful &amp;quot;sudo nginx -t&amp;quot;&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Important_Nginx_Directories&amp;diff=1811</id>
		<title>Important Nginx Directories</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Important_Nginx_Directories&amp;diff=1811"/>
		<updated>2022-05-12T15:39:44Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
This wiki entry's purpose is to list all important directories for managing the web server. Here you will find all of the server blocks exact location, as well as all of the websites files. I will try to list every config file I have edited throughout the course of the year to help with future debugging.&lt;br /&gt;
&lt;br /&gt;
== Directories ==&lt;br /&gt;
&lt;br /&gt;
=== Server blocks/Website config files ===&lt;br /&gt;
&amp;lt;code&amp;gt;/etc/nginx/sites-available&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;/etc/nginx/sites-enabled&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 24pin.tech ===&lt;br /&gt;
&amp;lt;code&amp;gt;/var/www/24pin.tech&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== service.24pin.tech ===&lt;br /&gt;
&amp;lt;code&amp;gt;/var/www/service.24pin.tech&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== wiki.24pin.tech ===&lt;br /&gt;
&amp;lt;code&amp;gt;/var/www/wiki.24pin.tech&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== evit.computer ===&lt;br /&gt;
&amp;lt;code&amp;gt;/var/www/evit.computer&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files ==&lt;br /&gt;
&lt;br /&gt;
=== Manual Network Config ===&lt;br /&gt;
&amp;lt;code&amp;gt;/etc/netplan/50-cloud-init.yaml&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DNS Nameserver Config ===&lt;br /&gt;
&amp;lt;code&amp;gt;/etc/resolv.conf&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1806</id>
		<title>Adding a New Domain or Subdomain</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1806"/>
		<updated>2022-05-10T16:52:28Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== New Domains in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Generally speaking, adding a new (website/domain/server block) is very easy in [[Nginx]]. A common misconception throughout 24PinTech is that creating a server block is difficult, to try to curb the fear, I will go over adding a new website to our specific server setup.&lt;br /&gt;
&lt;br /&gt;
==== What you need to start ====&lt;br /&gt;
&lt;br /&gt;
* Access to a working [[Nginx]] Webserver&lt;br /&gt;
* A domain with a working A record pointing to our public IP address.&lt;br /&gt;
*[[HTTPS with Certbot (LetsEncrypt)|Certbot (LetsEncrypt)]]&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
[[File:Esxi login.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
==== Log in to the Nginx Webserver ====&lt;br /&gt;
To begin your process of adding a server block to [[Nginx]] navigate to your favorite web browser and type in the address bar, &amp;quot;''10.21.25.2&amp;quot;''. This will take you to our Valhalla [[ESXi|ESXi box]], this is our [[ESXi|ESXi box]] that hosts all of our production VMs, which is also where devloganweb lives (our Webserver). If you are an administrator on our domain you may log in with your account for the in-class computers, otherwise see a server manager or [[Bradley Chamberlain]] for root account access. Navigate to the Webserver VM and log into it using the information provided in the secret sauce.&lt;br /&gt;
&lt;br /&gt;
==== Creating the Nginx Server Block ====&lt;br /&gt;
Once you have logged into the webserver you will need to create an [[Nginx]] server block. Use the [[Linux Basics for Webserver]] page if any of the commands used are confusing to you. Make sure you have a full understanding of this process otherwise it will be a pain to debug.&lt;br /&gt;
&lt;br /&gt;
Firstly, navigate to the sites-available directory by running the command &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. This directory holds all of the [[Nginx]] website server blocks. These server blocks are what actually lets the website run on the internet. Once in the ''sites-available'' directory you will have access to view/edit all of the other website server blocks. To create a new server block for your domain, run the command &amp;lt;code&amp;gt;sudo touch ./example.org&amp;lt;/code&amp;gt; to create the file, then &amp;lt;code&amp;gt;sudo nano ./example.org&amp;lt;/code&amp;gt; to edit the file. Alternatively, you may just run the ladder command to create and edit the file. The server blocks have very specific formatting for everything to run correctly. The following is a basic server block that has been commented to increase understanding.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
     listen 80; # This is the port that Nginx will be listening on&lt;br /&gt;
     listen [::]:80; # ex. 80 = HTTP, while 443 = HTTPS. We will never use 443.&lt;br /&gt;
&lt;br /&gt;
     # If you're not going to be using a domain,&lt;br /&gt;
     # then you can replace it with an IP&lt;br /&gt;
     server_name domain.com;&lt;br /&gt;
&lt;br /&gt;
     # The root is the directory that the website files will be held in&lt;br /&gt;
     root /var/www/domain.com;&lt;br /&gt;
     index index.php index.html index.htm; # The default web page&lt;br /&gt;
&lt;br /&gt;
     location = /favicon.io {&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location = /robots.txt {&lt;br /&gt;
          allow all;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location / {&lt;br /&gt;
          try_files $uri $uri/ /index.php$args;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~ \.php$ {&lt;br /&gt;
          include snippets/fastcgi-php.conf;&lt;br /&gt;
          fastcgi_intercept_errors on;&lt;br /&gt;
          fastcgi_pass unix:/run/php/php7.4-fpm.sock; # Change this to current php version&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {&lt;br /&gt;
          expires max;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save and exit your file. &lt;br /&gt;
&lt;br /&gt;
== New Sub-Domain in Nginx ==&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1805</id>
		<title>Adding a New Domain or Subdomain</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1805"/>
		<updated>2022-05-10T16:48:41Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== New Domains in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Generally speaking, adding a new (website/domain/server block) is very easy in [[Nginx]]. A common misconception throughout 24PinTech is that creating a server block is difficult, to try to curb the fear, I will go over adding a new website to our specific server setup.&lt;br /&gt;
&lt;br /&gt;
==== What you need to start ====&lt;br /&gt;
&lt;br /&gt;
* Access to a working [[Nginx]] Webserver&lt;br /&gt;
* A domain with a working A record pointing to our public IP address.&lt;br /&gt;
*[[HTTPS with Certbot (LetsEncrypt)|Certbot (LetsEncrypt)]]&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
[[File:Esxi login.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
==== Log in to the Nginx Webserver ====&lt;br /&gt;
To begin your process of adding a server block to [[Nginx]] navigate to your favorite web browser and type in the address bar, &amp;quot;''10.21.25.2&amp;quot;''. This will take you to our Valhalla [[ESXi|ESXi box]], this is our [[ESXi|ESXi box]] that hosts all of our production VMs, which is also where devloganweb lives (our Webserver). If you are an administrator on our domain you may log in with your account for the in-class computers, otherwise see a server manager or [[Bradley Chamberlain]] for root account access. Navigate to the Webserver VM and log into it using the information provided in the secret sauce.&lt;br /&gt;
&lt;br /&gt;
==== Creating the Nginx Server Block ====&lt;br /&gt;
Once you have logged into the webserver you will need to create an [[Nginx]] server block. Use the [[Linux Basics for Webserver]] page if any of the commands used are confusing to you. Make sure you have a full understanding of this process otherwise it will be a pain to debug.&lt;br /&gt;
&lt;br /&gt;
Firstly, navigate to the sites-available directory by running the command &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. This directory holds all of the [[Nginx]] website server blocks. These server blocks are what actually lets the website run on the internet. Once in the ''sites-available'' directory you will have access to view/edit all of the other website server blocks. To create a new server block for your domain, run the command &amp;lt;code&amp;gt;sudo touch ./example.org&amp;lt;/code&amp;gt; to create the file, then &amp;lt;code&amp;gt;sudo nano ./example.org&amp;lt;/code&amp;gt; to edit the file. Alternatively, you may just run the ladder command to create and edit the file. The server blocks have very specific formatting for everything to run correctly. The following is a basic server block that has been commented to increase understanding.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
     listen 80; # This is the port that Nginx will be listening on&lt;br /&gt;
     listen [::]:80; # ex. 80 = HTTP, while 443 = HTTPS. We will never use 443.&lt;br /&gt;
&lt;br /&gt;
     # If you're not going to be using a domain,&lt;br /&gt;
     # then you can replace it with an IP&lt;br /&gt;
     server_name domain.com;&lt;br /&gt;
&lt;br /&gt;
     # The root is the directory that the website files will be held in&lt;br /&gt;
     root /var/www/domain.com;&lt;br /&gt;
     index index.php index.html index.htm; # The default web page&lt;br /&gt;
&lt;br /&gt;
     location = /favicon.io {&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location = /robots.txt {&lt;br /&gt;
          allow all;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location / {&lt;br /&gt;
          try_files $uri $uri/ /index.php$args;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~ \.php$ {&lt;br /&gt;
          include snippets/fastcgi-php.conf;&lt;br /&gt;
          fastcgi_intercept_errors on;&lt;br /&gt;
          fastcgi_pass unix:/run/php/php7.4-fpm.sock; # Change this to current php version&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {&lt;br /&gt;
          expires max;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dsjfkld&lt;br /&gt;
&lt;br /&gt;
== New Sub-Domain in Nginx ==&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1804</id>
		<title>Adding a New Domain or Subdomain</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1804"/>
		<updated>2022-05-10T16:47:54Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== New Domains in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Generally speaking, adding a new (website/domain/server block) is very easy in [[Nginx]]. A common misconception throughout 24PinTech is that creating a server block is difficult, to try to curb the fear, I will go over adding a new website to our specific server setup.&lt;br /&gt;
&lt;br /&gt;
==== What you need to start ====&lt;br /&gt;
&lt;br /&gt;
* Access to a working [[Nginx]] Webserver&lt;br /&gt;
* A domain with a working A record pointing to our public IP address.&lt;br /&gt;
*[[HTTPS with Certbot (LetsEncrypt)|Certbot (LetsEncrypt)]]&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
[[File:Esxi login.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
==== Log in to the Nginx Webserver ====&lt;br /&gt;
To begin your process of adding a server block to [[Nginx]] navigate to your favorite web browser and type in the address bar, &amp;quot;''10.21.25.2&amp;quot;''. This will take you to our Valhalla [[ESXi|ESXi box]], this is our [[ESXi|ESXi box]] that hosts all of our production VMs, which is also where devloganweb lives (our Webserver). If you are an administrator on our domain you may log in with your account for the in-class computers, otherwise see a server manager or [[Bradley Chamberlain]] for root account access. Navigate to the Webserver VM and log into it using the information provided in the secret sauce.&lt;br /&gt;
&lt;br /&gt;
==== Creating the Nginx Server Block ====&lt;br /&gt;
Once you have logged into the webserver you will need to create an [[Nginx]] server block. Use the [[Linux Basics for Webserver]] page if any of the commands used are confusing to you. Make sure you have a full understanding of this process otherwise it will be a pain to debug.&lt;br /&gt;
&lt;br /&gt;
Firstly, navigate to the sites-available directory by running the command &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. This directory holds all of the [[Nginx]] website server blocks. These server blocks are what actually lets the website run on the internet. Once in the ''sites-available'' directory you will have access to view/edit all of the other website server blocks. To create a new server block for your domain, run the command &amp;lt;code&amp;gt;sudo touch ./example.org&amp;lt;/code&amp;gt; to create the file, then &amp;lt;code&amp;gt;sudo nano ./example.org&amp;lt;/code&amp;gt; to edit the file. Alternatively, you may just run the ladder command to create and edit the file. The server blocks have very specific formatting for everything to run correctly. The following is a basic server block that has been commented to increase understanding.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
     listen 80; # This is the port that Nginx will be listening on&lt;br /&gt;
     listen [::]:80; # ex. 80 = HTTP, while 443 = HTTPS. We will never use 443.&lt;br /&gt;
&lt;br /&gt;
     # If you're not going to be using a domain,&lt;br /&gt;
     # then you can replace it with an IP&lt;br /&gt;
     server_name domain.com;&lt;br /&gt;
&lt;br /&gt;
     # The root is the directory that the website files will be held in&lt;br /&gt;
     root /var/www/domain.com;&lt;br /&gt;
     index index.php index.html index.htm; # The default web page&lt;br /&gt;
&lt;br /&gt;
     location = /favicon.io {&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location = /robots.txt {&lt;br /&gt;
          allow all;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location / {&lt;br /&gt;
          try_files $uri $uri/ /index.php$args;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~ \.php$ {&lt;br /&gt;
          include snippets/fastcgi-php.conf;&lt;br /&gt;
          fastcgi_intercept_errors on;&lt;br /&gt;
          fastcgi_pass unix:/run/php/php7.4-fpm.sock; # Change this to current php version&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {&lt;br /&gt;
          expires max;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== New Sub-Domain in Nginx ==&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
	<entry>
		<id>https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1803</id>
		<title>Adding a New Domain or Subdomain</title>
		<link rel="alternate" type="text/html" href="https://wiki.24pin.tech/index.php?title=Adding_a_New_Domain_or_Subdomain&amp;diff=1803"/>
		<updated>2022-05-10T16:44:17Z</updated>

		<summary type="html">&lt;p&gt;Lchristopherson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Webserver]]&lt;br /&gt;
&lt;br /&gt;
== New Domains in Nginx ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
Generally speaking, adding a new (website/domain/server block) is very easy in [[Nginx]]. A common misconception throughout 24PinTech is that creating a server block is difficult, to try to curb the fear, I will go over adding a new website to our specific server setup.&lt;br /&gt;
&lt;br /&gt;
==== What you need to start ====&lt;br /&gt;
&lt;br /&gt;
* Access to a working [[Nginx]] Webserver&lt;br /&gt;
* A domain with a working A record pointing to our public IP address.&lt;br /&gt;
*[[HTTPS with Certbot (LetsEncrypt)|Certbot (LetsEncrypt)]]&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
[[File:Esxi login.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
==== Log in to the Nginx Webserver ====&lt;br /&gt;
To begin your process of adding a server block to [[Nginx]] navigate to your favorite web browser and type in the address bar, &amp;quot;''10.21.25.2&amp;quot;''. This will take you to our Valhalla [[ESXi|ESXi box]], this is our [[ESXi|ESXi box]] that hosts all of our production VMs, which is also where devloganweb lives (our Webserver). If you are an administrator on our domain you may log in with your account for the in-class computers, otherwise see a server manager or [[Bradley Chamberlain]] for root account access. Navigate to the Webserver VM and log into it using the information provided in the secret sauce.&lt;br /&gt;
&lt;br /&gt;
==== Creating the Nginx Server Block ====&lt;br /&gt;
Once you have logged into the webserver you will need to create an [[Nginx]] server block. Use the [[Linux Basics for Webserver]] page if any of the commands used are confusing to you. Make sure you have a full understanding of this process otherwise it will be a pain to debug.&lt;br /&gt;
&lt;br /&gt;
Firstly, navigate to the sites-available directory by running the command &amp;lt;code&amp;gt;cd /etc/nginx/sites-available&amp;lt;/code&amp;gt;. This directory holds all of the [[Nginx]] website server blocks. These server blocks are what actually lets the website run on the internet. Once in the ''sites-available'' directory you will have access to view/edit all of the other website server blocks. To create a new server block for your domain, run the command &amp;lt;code&amp;gt;sudo touch ./example.org&amp;lt;/code&amp;gt; to create the file, then &amp;lt;code&amp;gt;sudo nano ./example.org&amp;lt;/code&amp;gt; to edit the file. Alternatively, you may just run the ladder command to create and edit the file. The server blocks have very specific formatting for everything to run correctly. The following is a basic server block that has been commented to increase understanding.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
     listen 80;&lt;br /&gt;
     listen [::]:80;&lt;br /&gt;
&lt;br /&gt;
     # this is a comment! you don't have to include this, but if you're not&lt;br /&gt;
     # going to be using a domain, then you can replace it with an IP&lt;br /&gt;
     server_name example.ms;&lt;br /&gt;
&lt;br /&gt;
     root /var/www/example.ms;&lt;br /&gt;
     index index.php index.html index.htm;&lt;br /&gt;
&lt;br /&gt;
     location = /favicon.io {&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location = /robots.txt {&lt;br /&gt;
          allow all;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
          access_log off;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location / {&lt;br /&gt;
          try_files $uri $uri/ /index.php$args;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~ \.php$ {&lt;br /&gt;
          include snippets/fastcgi-php.conf;&lt;br /&gt;
          fastcgi_intercept_errors on;&lt;br /&gt;
          fastcgi_pass unix:/run/php/php7.2-fpm.sock;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {&lt;br /&gt;
          expires max;&lt;br /&gt;
          log_not_found off;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== New Sub-Domain in Nginx ==&lt;/div&gt;</summary>
		<author><name>Lchristopherson</name></author>
	</entry>
</feed>