This Is Your Brain On Informatics: Common Pathnames: Difference between revisions

Tikenn (talk | contribs)
No edit summary
Tikenn (talk | contribs)
No edit summary
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
===/etc/init.d/[service] [operation]===
===Restarting, reloading, etc. a Service===
<pre>/etc/init.d/[service] [operation]</pre>


<p>This "pathname" is actually a script that causes the initiate daemon (that constantly stays in memory) to act on a service that has been input.  After the service, an operation can be input in from one of the following: </p>
''Services''
* nginx
* mysql
* php5-fpm
* denyhosts


''Operations''
* start
* start
* stop
* stop
Line 9: Line 15:
* force-reload
* force-reload


<p>For our purposes, the only services that we know that this script can act on are as follows: </p>
===Network File===
<pre>/etc/network/interfaces</pre>
 
===Important [[This Is Your Brain On Informatics: DenyHosts|Deny Hosts]] Files===
The hosts.deny file is for blocking IP addresses.
 
<pre>/etc/hosts.deny</pre>
 
The hosts.allow file is for permanently giving access to IP addresses.
 
<pre>/etc/host.allow</pre>


* nginx
* mysql
* php5-fpm


===/etc/hosts.deny===
{{This Is Your Brain On Informatics}}


<p>This file can be accessed via [[This Is Your Brain On Informatics: Pico|pico]] or any other text editor in order to manage the IP addresses that have been blocked from accessing your virtual machine (including your own if it accidentally happens).  Once you are in the file, delete the IP address (possibly your IP address) at the bottom of the file that you no longer wish to restrict.</p>
[[Category:This Is Your Brain On Informatics]]