<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux &#8211; Best DevOps</title>
	<atom:link href="https://www.bestdevops.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.bestdevops.com</link>
	<description>Lets Learn, Do it &#38; Share! Thats a Best DevOps!!!</description>
	<lastBuildDate>Wed, 01 Sep 2021 10:21:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>
	<item>
		<title>Composer: file_put_contents(./composer.json or ./composer.lock): failed to open stream: Permission denied</title>
		<link>https://www.bestdevops.com/composer-file_put_contents-composer-json-or-composer-lock-failed-to-open-stream-permission-denied/</link>
		
		<dc:creator><![CDATA[Sushant Kumar]]></dc:creator>
		<pubDate>Wed, 01 Sep 2021 05:19:33 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=20481</guid>

					<description><![CDATA[Problem When I run Composer update in my project then I got this error. Solution It can be resolved with [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h1 class="has-text-align-center wp-block-heading"><span class="has-inline-color has-primary-color">Problem</span></h1>



<p class="wp-block-paragraph">When I run Composer update in my project then I got this error.</p>


<pre class="wp-block-code"><span><code class="hljs">&#91;ErrorException]
  file_put_contents(./composer.lock): failed to open stream: Permission denied
</code></span></pre>


<h1 class="has-text-align-center wp-block-heading"><span class="has-inline-color has-primary-color">Solution</span></h1>



<p class="wp-block-paragraph">It can be resolved with the following command:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">sudo chown -R $USER ~<span class="hljs-regexp">/.composer/</span></code></span></pre>


<p class="wp-block-paragraph">That&#8217;s all.</p>



<p class="wp-block-paragraph">I hope this article helps you to fix your issue.</p>



<p class="wp-block-paragraph">Thanks for reading.</p>



<p class="wp-block-paragraph">Keep Exploring.</p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>The stream or file &#8220;/opt/lampp/htdocs/testproject/storage/logs/laravel-2021-08-31.log&#8221; could not be opened in append mode: failed to open stream: Permission denied</title>
		<link>https://www.bestdevops.com/the-stream-or-file-opt-lampp-htdocs-testproject-storage-logs-laravel-2021-08-31-log-could-not-be-opened-in-append-mode-failed-to-open-stream-permission-denied/</link>
		
		<dc:creator><![CDATA[Sushant Kumar]]></dc:creator>
		<pubDate>Tue, 31 Aug 2021 13:21:31 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=20465</guid>

					<description><![CDATA[Problem I&#8217;m getting this error after migrating my laravel project to linux server, see error below Solution the error is [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h1 class="has-text-align-center wp-block-heading"><span class="has-inline-color has-primary-color">Problem</span></h1>



<p class="wp-block-paragraph">I&#8217;m getting this error after migrating my laravel project to linux server, see error below</p>


<pre class="wp-block-code"><span><code class="hljs language-xml">UnexpectedValueException: The stream or file <span class="hljs-symbol">&amp;quot;</span>/opt/lampp/htdocs/testproject/storage/logs/laravel-2021-08-31.log<span class="hljs-symbol">&amp;quot;</span> could not be opened in append mode: failed to open stream: Permission denied in file /opt/lampp/htdocs/testproject/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 110
Stack trace:
  1. UnexpectedValueException-<span class="hljs-symbol">&amp;gt;</span>() /opt/lampp/htdocs/testproject/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:110
  2. Monolog\Handler\StreamHandler-<span class="hljs-symbol">&amp;gt;</span>write() /opt/lampp/htdocs/testproject/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php:120
  3. Monolog\Handler\RotatingFileHandler-<span class="hljs-symbol">&amp;gt;</span>write() /opt/lampp/htdocs/testproject/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php:39
  4. Monolog\Handler\AbstractProcessingHandler-<span class="hljs-symbol">&amp;gt;</span>handle() /opt/lampp/htdocs/testproject/vendor/monolog/monolog/src/Monolog/Logger.php:344
  5. Monolog\Logger-<span class="hljs-symbol">&amp;gt;</span>addRecord() /opt/lampp/htdocs/testproject/vendor/monolog/monolog/src/Monolog/Logger.php:712
  6. Monolog\Logger-<span class="hljs-symbol">&amp;gt;</span>error() /opt/lampp/htdocs/testproject/vendor/laravel/framework/src/Illuminate/Log/Logger.php:176
  7. Illuminate\Log\Logger-<span class="hljs-symbol">&amp;gt;</span>writeLog() /opt/lampp/htdocs/testproject/vendor/laravel/framework/src/Illuminate/Log/Logger.php:87
  8. Illuminate\Log\Logger-<span class="hljs-symbol">&amp;gt;</span>error() /opt/lampp/htdocs/testproject/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:500
  9. Illuminate\Log\LogManager-<span class="hljs-symbol">&amp;gt;</span>error() /opt/lampp/htdocs/testproject/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:118
 10. Illuminate\Foundation\Exceptions\Handler-<span class="hljs-symbol">&amp;gt;</span>report() /opt/lampp/htdocs/testproject/app/Exceptions/Handler.php:37
 11. App\Exceptions\Handler-<span class="hljs-symbol">&amp;gt;</span>report() /opt/lampp/htdocs/testproject/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:92
 12. Illuminate\Foundation\Bootstrap\HandleExceptions-<span class="hljs-symbol">&amp;gt;</span>handleException() &#91;internal]:0</code></span></pre>


<h1 class="has-text-align-center wp-block-heading"><span class="has-inline-color has-primary-color">Solution</span></h1>



<p class="wp-block-paragraph">the error is that, Storage folder doesn&#8217;t  have permission to write log files, you can run</p>


<pre class="wp-block-code"><span><code class="hljs"> chmod -R o+w projectname/storage
 chmod -R o+w projectname/bootstrap</code></span></pre>


<p class="wp-block-paragraph">if you are using nginx then you need to use nginx user permission like below</p>


<pre class="wp-block-code"><span><code class="hljs language-css"><span class="hljs-selector-tag">sudo</span> <span class="hljs-selector-tag">chown</span> <span class="hljs-selector-tag">-R</span> <span class="hljs-selector-tag">nginx</span><span class="hljs-selector-pseudo">:root</span> <span class="hljs-selector-tag">storage</span>
<span class="hljs-selector-tag">sudo</span> <span class="hljs-selector-tag">chown</span> <span class="hljs-selector-tag">-R</span> <span class="hljs-selector-tag">nginx</span><span class="hljs-selector-pseudo">:root</span> <span class="hljs-selector-tag">bootstrap</span></code></span></pre>


<p class="wp-block-paragraph">That&#8217;s All.</p>



<p class="wp-block-paragraph">I hope this article helps you to solve the problem.</p>



<p class="wp-block-paragraph">Thanks for reading.</p>



<p class="wp-block-paragraph">Keep Exploring.</p>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Access Logs and Error Logs (LOGGING BASICS) in apache</title>
		<link>https://www.bestdevops.com/access-logs-and-error-logs-logging-basics-in-apache/</link>
		
		<dc:creator><![CDATA[pradeep]]></dc:creator>
		<pubDate>Fri, 20 Aug 2021 11:43:03 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[CentOs]]></category>
		<category><![CDATA[error_logs]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[RHEL]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=19516</guid>

					<description><![CDATA[1. Locate where logged data is stored This simple task is made harder by the fact that Apache is cross-platform [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">1. <strong>Locate where logged data is stored</strong></h2>



<p class="wp-block-paragraph">This simple task is made harder by the fact that Apache is cross-platform software that runs on nearly every server-based operating system.</p>



<p class="wp-block-paragraph">While you might expect that Apache log files will be stored in different file system locations when running on a Mac or Windows PC, you should note that different Linux distros have their own ideas where to store log data.</p>



<p class="wp-block-paragraph">Apache also stores data in a number of different logging formats.</p>



<p class="wp-block-paragraph">The format your Apache installation uses is defined in the Apache configuration file.</p>



<ul class="wp-block-list"><li><strong>By default, Apache logs data uses the <a href="http://httpd.apache.org/docs/current/logs.html">Common Log Format </a>– the Common Log Format defines a label/nickname and associates it.</strong></li><li><strong>Another popular format is the Combined Log Format – this format is based on the Common Log Format, and combines it with the header of the HTTP access request.</strong></li><li><strong>Apache also lets you store log data in many common data formats, such as XML and JSON</strong></li></ul>



<h2 class="wp-block-heading">2. EXTRACTING DATA FROM APACHE ERROR LOGS AND APACHE ACCESS LOGS</h2>



<p class="wp-block-paragraph">Before exploring how to use log files, we need to discuss the best way to extract data from them.</p>



<p class="wp-block-paragraph">Apache access and error logs can give us valuable insights into the usage and functioning of an Apache-based website or application.</p>



<p class="wp-block-paragraph">However, the sheer amount of data that is collected can be overwhelming, and finding important indicators can be a daunting process.</p>



<p class="wp-block-paragraph">The obvious way to read log file data is using a basic text editor, but many editors may have a hard time dealing with large log files.</p>



<ul class="wp-block-list"><li><strong>A common approach to reading log files, especially on Linux/Unix based systems, is to take advantage of the operating system’s command line tools, such as GREP and AWK.</strong></li><li><strong>Another approach is to use scripting languages, such as BASH or Powershell to parse log files.</strong></li></ul>



<h2 class="wp-block-heading">3. Where is the Apache error log?</h2>



<p class="wp-block-paragraph">Depending on your Linux distribution, Apache log file locations may be available in different folders. One point that influences the location of the logs is the type of installation done from Apache. If you did a default installation, follow the log storage location(s).</p>



<p class="wp-block-paragraph">RHEL / Red Hat / CentOS / Fedora<br>/var/log/httpd/error_log</p>



<p class="wp-block-paragraph">Debian / Ubuntu<br>/var/log/apache2/error.log</p>



<p class="wp-block-paragraph">FreeBSD<br>/var/log/httpd-error.log</p>



<p class="wp-block-paragraph">To find the exact Apache error log file location(s), you can use the grep command:</p>



<p class="wp-block-paragraph">$ grep ErrorLog /usr/local/etc/apache22/httpd.conf<br>$ grep ErrorLog /etc/apache2/apache2.conf<br>$ grep ErrorLog /etc/httpd/conf/httpd.conf</p>



<p class="wp-block-paragraph">Sample output:</p>



<p class="wp-block-paragraph"># ErrorLog: The location of the error log file.<br># If you do not specify an ErrorLog directive within a<br>ErrorLog “/var/log/httpd-error.log”</p>



<p class="wp-block-paragraph">In order to succeed in log reading, you need to know the structure of the log, and where to find it. In the case of Apache running on Linux servers, there are default paths.</p>



<p class="wp-block-paragraph">The default format of the Apache error log is defined by the ErrorLogFormat directive. It takes this form:</p>



<p class="wp-block-paragraph">ErrorLogFormat “[%t] [%l] [client %a] %M”<br>%t is time relative to the server<br>%l is the level of the message (error, notice, fatal, etc.)<br>%a is the client IP making the request (if it exists)<br>%M is the actual error message</p>



<p class="wp-block-paragraph">An example:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">&#91;Sun Jul <span class="hljs-number">09</span> <span class="hljs-number">03</span>:<span class="hljs-number">25</span>:<span class="hljs-number">02</span> <span class="hljs-number">2017</span>] &#91;notice] Apache/<span class="hljs-number">2.2</span><span class="hljs-number">.32</span> (Unix) DAV/<span class="hljs-number">2</span> configured -- resuming normal operations
&#91;Sun Jul <span class="hljs-number">09</span> <span class="hljs-number">04</span>:<span class="hljs-number">06</span>:<span class="hljs-number">13</span> <span class="hljs-number">2017</span>] &#91;error] &#91;client <span class="hljs-number">1.2</span><span class="hljs-number">.3</span><span class="hljs-number">.4</span>] File does not exist: <span class="hljs-regexp">/var/</span>www/html/robots.txt
&#91;Mon Jul <span class="hljs-number">10</span> <span class="hljs-number">20</span>:<span class="hljs-number">24</span>:<span class="hljs-number">52</span> <span class="hljs-number">2017</span>] &#91;error] (<span class="hljs-number">111</span>)Connection refused: proxy: HTTP: attempt to connect to <span class="hljs-number">127.0</span><span class="hljs-number">.0</span><span class="hljs-number">.1</span>:<span class="hljs-number">8484</span> (localhost) failed</code></span></pre>


<h2 class="wp-block-heading">4. View Apache error logs</h2>



<p class="wp-block-paragraph">When you have a tool for displaying the data stored in a log, you can quickly find the answers you need. To monitor Apache logs, the easy-to-use Sumo Logic Apache App service is a great choice. You can quickly install the application and configure it to receive the data from your server, and display needed information.</p>



<p class="wp-block-paragraph">The data that can be monitored are:</p>



<ul class="wp-block-list"><li>Bytes Delivered</li><li>HTTP Errors</li><li>Page Hits</li><li>Response Time</li><li>Web Server</li></ul>



<p class="wp-block-paragraph">This data allows you to work safely, and analyze all traffic your application receives.</p>



<h2 class="wp-block-heading">5. Apache Error Log Analysis</h2>



<p class="wp-block-paragraph">Apache logs contain valuable operational data. Apache error log analysis from Sumo Logic can provide insight and alerts to server errors, request processing, and other diagnostic issues. Analyzing Apache error logs has never been easier, and with Sumo Logic’s built-in error log parser, you can quickly visualize your logs without writing any regex.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to setup SSL certificate for apache</title>
		<link>https://www.bestdevops.com/how-to-setup-ssl-certificate-for-apache/</link>
		
		<dc:creator><![CDATA[pradeep]]></dc:creator>
		<pubDate>Fri, 20 Aug 2021 10:50:30 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[ssl.conf]]></category>
		<category><![CDATA[vhost]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=19514</guid>

					<description><![CDATA[Environment SUSE Linux Enterprise ServerNovell Open Enterprise ServerNovell GroupWise Situation How to SSLize WebAccess on LinuxHow to secure WebAccess using [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Environment</h2>



<p class="wp-block-paragraph">SUSE Linux Enterprise ServerNovell Open Enterprise ServerNovell GroupWise</p>



<h2 class="wp-block-heading">Situation</h2>



<p class="wp-block-paragraph">How to SSLize WebAccess on Linux<br>How to secure WebAccess using SSLGroupWise WebAccess shows untrusted certificate after pointing to 3rd party certificate using ConsoleOne for WebAccess Agent</p>



<h2 class="wp-block-heading">Resolution</h2>



<ol class="wp-block-list"><li><em>(conditional)</em>&nbsp;If not yet configured, Enable the SSL module and set the Apache Server Flags to SSL:<ul><li>From a terminal window: edit file&nbsp;/etc/sysconfig/apache2</li><li>Verify&nbsp;ssl&nbsp;is found in the list of&nbsp;APACHE_MODULES.<br><em>Note: If it is not, please run the following command, which should enable the ssl module and add it to this list:</em><br>sudo a2enmod ssl</li><li>From this same file, please find&nbsp;APACHE_SERVER_FLAGS=&#8221;&#8221;&nbsp;and add&nbsp;SSL&nbsp;in between&nbsp;the quotations.</li><li>Create a virtual host for ssl by copying from the template:<br>cp /etc/apache2/vhosts.d/vhost-ssl.template /etc/apache2/vhosts.d/vhost-ssl.conf<br></li></ul></li><li>Configure Apache to use new certificate files:<ul><li>From a terminal window:&nbsp;cd /etc/apache2/vhosts.d/</li><li>Edit file&nbsp;vhost-ssl.conf</li><li>Update paths to the appropriate file(s) as needed:<ul><li>SSLCertificateFile &lt;directory to the cert (*.cert)&gt;</li><li>SSLCertificateKeyFile &lt;path to the private key (*.key)&gt;</li><li>SSLCertificateChainFile &lt;path to CA Chain file(s)&gt;</li><li>SSLCACertificateFile &lt;path to bundles&gt;</li></ul></li><li>Save and Close.</li><li>From a Terminal window: type&nbsp;rcapache2 restart&nbsp;and press Enter.</li></ul></li></ol>



<h2 class="wp-block-heading">Additional Information</h2>



<p class="wp-block-paragraph"><strong>How to setup Apache using a single PEM file, if so desired</strong>.<br>Replace Step 2 above with the following:</p>



<ol class="wp-block-list"><li>See&nbsp;<a href="https://support.microfocus.com/kb/doc.php?id=7013103">TID 7013103</a>&nbsp;&#8211; How to create a .pem file for SSL Certificate Installations</li><li>Point Apache to the New PEM:</li></ol>



<ol class="wp-block-list"><li>From a terminal window: type&nbsp;cd /etc/apache2/vhosts.d/&nbsp;and press Enter.</li><li>Edit file&nbsp;vhost-ssl.conf</li><li>Find and replace with the path to the same file:<ul><li>SSLCertificateFile &lt;path to the server.pem&gt;</li><li>SSLCertificateChainFile &lt;path to the server.pem&gt;</li></ul></li><li>Comment out any other Certificate configuration (pem created above&nbsp;includes them):<ul><li>SSLCertificateKeyFile</li></ul><ul><li>SSLCACertificateFile</li></ul></li><li>Save and Close.</li><li>From a Terminal window: type&nbsp;rcapache2 restart&nbsp;and press Enter.</li></ol>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Configuring Apache Access Control</title>
		<link>https://www.bestdevops.com/configuring-apache-access-control/</link>
		
		<dc:creator><![CDATA[pradeep]]></dc:creator>
		<pubDate>Fri, 20 Aug 2021 10:44:37 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Access]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[CORS]]></category>
		<category><![CDATA[headersModule]]></category>
		<category><![CDATA[virtualHost]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=19512</guid>

					<description><![CDATA[Controlling Access Based on User Identity  Access to parts of a site can be restricted Require authentication and authorization [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Controlling Access Based on User Identity</h2>



<p class="wp-block-paragraph"> <strong>Access to parts of a site can be restricted</strong><br>      Require authentication and authorization of the user</p>



<p class="wp-block-paragraph"><br><strong> User account information can be kept in several places</strong><br>       Plain text files<br>       DBM files<br>       MySQL database</p>



<p class="wp-block-paragraph"><strong>Here, we&#8217;ll restrict access to the &#8220;admin&#8221; section of our site to the</strong><br>         librarians Jim and Carla Since the number of users is small, we&#8217;ll store them in a plain text file</p>



<p class="wp-block-paragraph">Managing the User Account File</p>



<h2 class="wp-block-heading">1 Enable headers module</h2>



<p class="wp-block-paragraph">You need to enable headers module to enable CORS in Apache.</p>



<p class="wp-block-paragraph"><strong>Ubuntu/Debian</strong></p>



<p class="wp-block-paragraph">In ubuntu/debian linux, open terminal &amp; run the following command to enable headers module.</p>


<pre class="wp-block-code"><span><code class="hljs">$ sudo a2emod headers</code></span></pre>


<p class="wp-block-paragraph"><strong>CentOS/Redhat/Fedora</strong></p>



<p class="wp-block-paragraph">In CentOS/Redhat/Fedora linux, open the Apache configuration file <em>httpd.conf</em> and uncomment the following line by removing # in front of them.</p>



<pre class="wp-block-preformatted">LoadModule headers_module modules/mod_headers.so</pre>



<h2 class="wp-block-heading">2 Enable CORS in Apache</h2>



<p class="wp-block-paragraph">Next, add the “Header add Access-Control-Allow-Origin *” directive to either your Apache config file, or .htaccess file, or Virtual Host configuration file, depending on your requirement. If you add it to your main configuration file, CORS will be enabled to all websites on your server. If you add it to .htaccess file or  virtual host configuration file, then it will be enabled for only that file’s website. Here are examples of how to add this directive in different files. You can use any one of them.</p>



<p class="wp-block-paragraph"><strong>Directory Tag in Main Configuration File</strong></p>



<pre class="wp-block-preformatted">&lt;Directory /var/www/html&gt;
   ...
 &nbsp; Header set Access-Control-Allow-Origin "*"
   ...
&lt;/Directory&gt;</pre>



<p class="wp-block-paragraph">Anywhere in .htaccess file</p>



<pre class="wp-block-preformatted">   ...
   Header add Access-Control-Allow-Origin "*"
   ...</pre>



<p class="wp-block-paragraph">VirtualHost Tag in Virtual Host Configuration File</p>



<pre class="wp-block-preformatted">&lt;VirtualHost *:443&gt;
   ...
   Header add Access-Control-Allow-Origin "*"
   ...
&lt;/VirtualHost&gt;</pre>



<h2 class="wp-block-heading">Enable CORS from all websites</h2>



<p class="wp-block-paragraph">If you want to enable CORS for all websites, that is, accept cross domain requests from all websites, add the following</p>



<pre class="wp-block-preformatted">Header add Access-Control-Allow-Origin *;</pre>



<p class="wp-block-paragraph">In the above statement, we use wildcard (*) for Apache Access-Control-Allow-Origin directive</p>



<h3 class="wp-block-heading">Enable&nbsp; CORS from one domain</h3>



<p class="wp-block-paragraph">If you want to enable CORS for one website domain (e.g example.com), specify that domain in place of wildcard character *.</p>



<pre class="wp-block-preformatted">Header add Access-Control-Allow-Origin "example.com";</pre>



<h3 class="wp-block-heading">Enable CORS from multiple domains</h3>



<p class="wp-block-paragraph">If you want to enable CORS for multiple domains (e.g example1.com, example2.com,example3.com), specify them separately one after another</p>



<pre class="wp-block-preformatted">Header add Access-Control-Allow-Origin "example1.com";
Header add Access-Control-Allow-Origin "example2.com";
Header add Access-Control-Allow-Origin "example3.com";</pre>



<h3 class="wp-block-heading">Enable CORS from localhost</h3>



<p class="wp-block-paragraph">If you want to enable CORS from localhost, add 127.0.0.1 or localhost in place of domain name</p>



<pre class="wp-block-preformatted">Header add Access-Control-Allow-Origin "localhost";</pre>



<h2 class="wp-block-heading">3. Restart Apache Server</h2>



<p class="wp-block-paragraph">Restart Apache web server to apply changes</p>



<pre class="wp-block-preformatted">-------------- On Debian/Ubuntu -------------- 
# apache2 -t
# systemctl restart apache2.service

-------------- On RHEL/CentOS/Fedora --------------
# httpd -t
# systemctl restart httpd.service</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Configuring Virtual Hosting in Apache</title>
		<link>https://www.bestdevops.com/configuring-virtual-hosting-in-apache/</link>
		
		<dc:creator><![CDATA[pradeep]]></dc:creator>
		<pubDate>Fri, 20 Aug 2021 10:23:22 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[virtual host]]></category>
		<category><![CDATA[Virtual machines]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=19505</guid>

					<description><![CDATA[&#8220;Virtual hosting is a method for hosting multiple domain names (with separate handling of each name) on a single server [&#8230;]]]></description>
										<content:encoded><![CDATA[
<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>&#8220;Virtual hosting is a method for hosting multiple domain names (with separate handling of each name) on a single server (or pool of servers).&#8221;</p><cite>Wikipedia</cite></blockquote>



<h2 class="wp-block-heading">How Does Apache Know Which Site to Serve?</h2>



<p class="wp-block-paragraph"><br>The short answer to your specific case: apache will serve the FIRST overlapping virtual host. Since 000-default is before fc.localhost in the alphabet the first virtualhost is loaded and served.</p>



<p class="wp-block-paragraph">To answer what i assume is the follow up question: You can host many sites on the same IP:PORT using named VirtualHosts</p>



<p class="wp-block-paragraph">T<strong>he host field in the http request header identifies which site (virtual<br>host) to serve:</strong></p>



<figure class="wp-block-image size-full is-resized"><img decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-110.png" alt="" class="wp-image-19506" width="571" height="66" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-110.png 742w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-110-300x35.png 300w" sizes="(max-width: 571px) 100vw, 571px" /></figure>



<p class="wp-block-paragraph"><strong>Matched against the containers in the configuration file</strong></p>



<figure class="wp-block-image size-full is-resized"><img fetchpriority="high" decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-111.png" alt="" class="wp-image-19507" width="651" height="413" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-111.png 920w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-111-300x191.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-111-768x488.png 768w" sizes="(max-width: 651px) 100vw, 651px" /></figure>



<h2 class="wp-block-heading">A More Complete Virtual Host Definition</h2>



<p class="wp-block-paragraph">You can put (almost) any directive inside a virtual host container For example, it&#8217;s common to write separate logs for each site</p>



<figure class="wp-block-image size-full is-resized"><img decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-113.png" alt="" class="wp-image-19509" width="608" height="166" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-113.png 735w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-113-300x82.png 300w" sizes="(max-width: 608px) 100vw, 608px" /></figure>



<h2 class="wp-block-heading">Name Resolution</h2>



<ol class="wp-block-list"><li><strong>In the &#8220;real world&#8221; our East and West sites would each have an entry in DNS (Domain Name Service)</strong></li><li><strong>Our demonstration system uses only /etc/hosts for name resolution:</strong></li></ol>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-114.png" alt="" class="wp-image-19510" width="426" height="91" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-114.png 579w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-114-300x64.png 300w" sizes="auto, (max-width: 426px) 100vw, 426px" /></figure>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Basic Apache Configuration</title>
		<link>https://www.bestdevops.com/basic-apache-configuration/</link>
		
		<dc:creator><![CDATA[pradeep]]></dc:creator>
		<pubDate>Fri, 20 Aug 2021 10:12:34 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[httpd.conf]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=19495</guid>

					<description><![CDATA[Apache&#8217;s Modular Architecture corepreforkhttp_coremod_soLoadModuledirectives mod_aliasmod_mimemod_proxymod_rewritemod_status The core executable others … The directory Apache The httpd package we installed includes the [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Apache&#8217;s Modular Architecture</h2>



<figure class="wp-block-table"><table><tbody><tr><td>core<br>prefork<br>http_core<br>mod_so<br>LoadModule<br>directives</td><td>mod_alias<br>mod_mime<br>mod_proxy<br>mod_rewrite<br>mod_status<br></td></tr><tr><td>The core executable</td><td>others …</td></tr></tbody></table></figure>



<h3 class="wp-block-heading"><br>The directory Apache </h3>


<pre class="wp-block-code"><span><code class="hljs">/usr/lib64/httpd/modules</code></span></pre>


<h3 class="wp-block-heading">The httpd package we installed includes the config file:</h3>


<pre class="wp-block-code"><span><code class="hljs">/etc/httpd/conf/httpd.conf</code></span></pre>


<h3 class="wp-block-heading">Listening on a Port</h3>



<p class="wp-block-paragraph">You can restrict apache to listen on a specific network interface </p>



<p class="wp-block-paragraph"><strong>Listen 22</strong>.<strong>33.44.55:80</strong></p>



<h3 class="wp-block-heading">Setting the Document Root</h3>



<p class="wp-block-paragraph"><br>The DocumentRoot defines the top-level directory of the web site</p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-107.png" alt="" class="wp-image-19498" width="658" height="357" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-107.png 891w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-107-300x163.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-107-768x416.png 768w" sizes="auto, (max-width: 658px) 100vw, 658px" /></figure>



<h3 class="wp-block-heading">Setting an Identity</h3>



<p class="wp-block-paragraph" id="block-8cc19c6e-ade0-4125-bc09-ae275db16722">Apache needs a user identity to run as Used to perform access control checks to the file system</p>



<h3 class="wp-block-heading">Defining Multi-Process Settings</h3>



<p class="wp-block-paragraph">To improve response times, apache manages a pool of &#8220;spare&#8221; server<br>processes<br>These numbers control the size of the pool:</p>



<figure class="wp-block-table"><table><tbody><tr><td>StartServers</td><td>8</td></tr><tr><td>MinSpareServers</td><td>5</td></tr><tr><td>MaxSpareServers</td><td>20</td></tr><tr><td>ServerLimit</td><td>256</td></tr><tr><td>MaxClients</td><td>256</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">Containers</h2>



<p class="wp-block-paragraph"><strong>Container directives use XML-style opening / closing tags</strong></p>



<p class="wp-block-paragraph">Restrict the scope of the directives they contain</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="570" height="225" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-108.png" alt="" class="wp-image-19501" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-108.png 570w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-108-300x118.png 300w" sizes="auto, (max-width: 570px) 100vw, 570px" /></figure>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-109.png" alt="" class="wp-image-19503" width="614" height="323" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-109.png 755w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-109-300x158.png 300w" sizes="auto, (max-width: 614px) 100vw, 614px" /></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Installing and Configuring Apache Web Server</title>
		<link>https://www.bestdevops.com/installing-and-configuring-apache-web-server/</link>
		
		<dc:creator><![CDATA[pradeep]]></dc:creator>
		<pubDate>Fri, 20 Aug 2021 09:49:51 +0000</pubDate>
				<category><![CDATA[IT Monitoring]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=19493</guid>

					<description><![CDATA[Step 1: Configure IIS Apache listens for requests on TCP/IP port 80. You need to uninstall or disable any program [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Step 1:  Configure IIS</h2>



<p class="wp-block-paragraph">Apache listens for requests on TCP/IP port 80. You need to uninstall or disable any program that uses that port. If you have a Professional or Server version of Windows, you may already have IIS installed. If you would prefer Apache, either remove IIS as a Windows component or disable its services.</p>



<h2 class="wp-block-heading">Step 2: Download the files </h2>



<p class="wp-block-paragraph">We’re going to use the unofficial Windows binary from Apache Lounge. This version has performance and stability improvements over the official Apache distribution, although I’m yet to notice a significant difference. However, it’s provided as a manually installable ZIP file from www.apachelounge.com/download/.</p>



<p class="wp-block-paragraph">You should also <a href="https://www.microsoft.com/en-us/download/details.aspx?id=48145">download and install the Windows C++ runtime from Microsoft.com</a>. You may have this installed already, but there is no harm installing it again.</p>



<h2 class="wp-block-heading">Step 3: Extract the Files</h2>



<p class="wp-block-paragraph">We’ll install Apache in <code>C:/Apache24</code>, so extract the ZIP file to the root of the <code>C:/</code> drive. Apache can be installed anywhere on your system, but you’ll need to change <code>SVROOT</code> configuration to point to your unzipped location — suh as <code>E:/Apache24</code>.</p>



<h2 class="wp-block-heading">Step 4: Configure Apache</h2>



<p class="wp-block-paragraph">Apache is configured with the text file&nbsp;<code>conf/httpd.conf</code>&nbsp;contained in the Apache folder. Open it with your favorite text editor.</p>



<p class="wp-block-paragraph">Note that all file path settings use a forward slash (<code>/</code>) rather than the Windows backslash. If you installed Apache anywhere other than <code>C:/Apache24</code>, now is a good time to search and replace all references to <code>C:/Apache24</code>.</p>



<p class="wp-block-paragraph">There are several lines you should change for your production environment:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Line 60, listen to all requests on port 80:<code>Listen *:80</code></p><p>Line 162, enable mod-rewrite by removing the # (optional, but useful):<code>LoadModule rewrite_module modules/mod_rewrite.so</code></p><p>Line 227, specify the server domain name:<code>ServerName localhost:80</code></p><p>Line 224, allow <code>.htaccess</code> overrides:<code>AllowOverride All</code></p><cite>After this test your installation&#8230; </cite></blockquote>



<h2 class="wp-block-heading">Step 5: Test your Installation</h2>



<p class="wp-block-paragraph">Your Apache configuration can now be tested. Open a command box (Start &gt; Run &gt;&nbsp;<code>cmd</code>) and enter:</p>


<pre class="wp-block-code"><span><code class="hljs language-php"><span class="hljs-comment"># navigate to Apache bin directory</span>
cd /Apache24/bin
<span class="hljs-comment"># Test httpd.conf validity</span>
httpd -t
</code></span></pre>


<p class="wp-block-paragraph">It should say “Syntax OK”. If not, correct any&nbsp;<code>httpd.conf</code>&nbsp;configuration errors and retest until none appear.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How To Set Up Task Scheduling With Cron Job In Laravel for Linux Server.</title>
		<link>https://www.bestdevops.com/how-to-set-up-task-scheduling-with-cron-job-in-laravel-for-linux-server/</link>
		
		<dc:creator><![CDATA[Sushant Kumar]]></dc:creator>
		<pubDate>Tue, 17 Aug 2021 10:02:00 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=19173</guid>

					<description><![CDATA[Step 1:- Run the below command to Install Laravel 5.8 Step 2 :- Now, we need to create a custom [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong><span class="has-inline-color has-primary-color">Step 1:-</span> </strong>Run the below command to Install Laravel 5.8</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">composer create-project --prefer-dist laravel/laravel testingcronjob <span class="hljs-string">"5.8.*"</span></code></span></pre>


<p class="wp-block-paragraph"><strong><span class="has-inline-color has-primary-color">Step 2 :-</span></strong> Now, we need to create a custom command. Custom command will execute with task scheduling cron job. Run the below command to create new custom command</p>


<pre class="wp-block-code"><span><code class="hljs">php artisan make:command DemoCron --command=demo:cron</code></span></pre>


<p class="wp-block-paragraph">Now we make some changes on Command file.</p>



<h2 class="wp-block-heading"><strong>app/Console/Commands/DemoCron.php</strong></h2>


<pre class="wp-block-code"><span><code class="hljs language-xml"><span class="php"><span class="hljs-meta">&lt;?php</span>
   
<span class="hljs-keyword">namespace</span> <span class="hljs-title">App</span>\<span class="hljs-title">Console</span>\<span class="hljs-title">Commands</span>;
   
<span class="hljs-keyword">use</span> <span class="hljs-title">Illuminate</span>\<span class="hljs-title">Console</span>\<span class="hljs-title">Command</span>;
   
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">DemoCron</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">Command</span>
</span>{
    <span class="hljs-comment">/**
     * The name and signature of the console command.
     *
     * <span class="hljs-doctag">@var</span> string
     */</span>
    <span class="hljs-keyword">protected</span> $signature = <span class="hljs-string">'demo:cron'</span>;
    
    <span class="hljs-comment">/**
     * The console command description.
     *
     * <span class="hljs-doctag">@var</span> string
     */</span>
    <span class="hljs-keyword">protected</span> $description = <span class="hljs-string">'Command description'</span>;
    
    <span class="hljs-comment">/**
     * Create a new command instance.
     *
     * <span class="hljs-doctag">@return</span> void
     */</span>
    <span class="hljs-keyword">public</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">__construct</span><span class="hljs-params">()</span>
    </span>{
        <span class="hljs-keyword">parent</span>::__construct();
    }
    
    <span class="hljs-comment">/**
     * Execute the console command.
     *
     * <span class="hljs-doctag">@return</span> mixed
     */</span>
    <span class="hljs-keyword">public</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">handle</span><span class="hljs-params">()</span>
    </span>{
        \Log::info(<span class="hljs-string">"Cron is working fine!"</span>);
     
        <span class="hljs-comment">/*
           Write your database logic we bellow:
           Item::create(&#91;'name'=&gt;'hello new']);
        */</span>
      
        <span class="hljs-keyword">$this</span>-&gt;info(<span class="hljs-string">'Demo:Cron Cummand Run successfully!'</span>);
    }
}</span></code></span></pre>


<p class="wp-block-paragraph"><span class="has-inline-color has-primary-color"><strong>Step 3 :-</strong> </span> Now, we need to define our commands on Kernel.php file with time when you want to run your command like as bellow functions:</p>



<figure class="wp-block-table"><table><tbody><tr><td>-&gt;everyMinute();</td><td>Run the task every minute</td></tr><tr><td>-&gt;everyFiveMinutes();</td><td>Run the task every five minutes</td></tr><tr><td>-&gt;everyTenMinutes();</td><td>Run the task every ten minutes</td></tr><tr><td>-&gt;everyFifteenMinutes();</td><td>Run the task every fifteen minutes</td></tr><tr><td>-&gt;everyThirtyMinutes();</td><td>Run the task every thirty minutes</td></tr><tr><td>-&gt;hourly();</td><td>Run the task every hour</td></tr><tr><td>-&gt;hourlyAt(17);</td><td>Run the task every hour at 17 mins past the hour</td></tr><tr><td>-&gt;daily();</td><td>Run the task every day at midnight</td></tr><tr><td>-&gt;dailyAt(’13:00′);</td><td>Run the task every day at 13:00</td></tr><tr><td>-&gt;twiceDaily(1, 13);</td><td>Run the task daily at 1:00 &amp; 13:00</td></tr><tr><td>-&gt;weekly();</td><td>Run the task every week</td></tr><tr><td>-&gt;weeklyOn(1, ‘8:00’);</td><td>Run the task every week on Tuesday at 8:00</td></tr><tr><td>-&gt;monthly();</td><td>Run the task every month</td></tr><tr><td>-&gt;monthlyOn(4, ’15:00′);</td><td>Run the task every month on the 4th at 15:00</td></tr><tr><td>-&gt;quarterly();</td><td>Run the task every quarter</td></tr><tr><td>-&gt;yearly();</td><td>Run the task every year</td></tr><tr><td>-&gt;timezone(‘America/New_York’);</td><td>Set the timezone</td></tr></tbody></table></figure>



<h2 class="wp-block-heading"><strong>app/Console/Kernel.php</strong></h2>


<pre class="wp-block-code"><span><code class="hljs language-xml"><span class="php"><span class="hljs-meta">&lt;?php</span>
   
<span class="hljs-keyword">namespace</span> <span class="hljs-title">App</span>\<span class="hljs-title">Console</span>;
    
<span class="hljs-keyword">use</span> <span class="hljs-title">Illuminate</span>\<span class="hljs-title">Console</span>\<span class="hljs-title">Scheduling</span>\<span class="hljs-title">Schedule</span>;
<span class="hljs-keyword">use</span> <span class="hljs-title">Illuminate</span>\<span class="hljs-title">Foundation</span>\<span class="hljs-title">Console</span>\<span class="hljs-title">Kernel</span> <span class="hljs-title">as</span> <span class="hljs-title">ConsoleKernel</span>;
    
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Kernel</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">ConsoleKernel</span>
</span>{
    <span class="hljs-comment">/**
     * The Artisan commands provided by your application.
     *
     * <span class="hljs-doctag">@var</span> array
     */</span>
    <span class="hljs-keyword">protected</span> $commands = &#91;
        Commands\DemoCron::class,
    ];
     
    <span class="hljs-comment">/**
     * Define the application's command schedule.
     *
     * <span class="hljs-doctag">@param</span>  \Illuminate\Console\Scheduling\Schedule  $schedule
     * <span class="hljs-doctag">@return</span> void
     */</span>
    <span class="hljs-keyword">protected</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">schedule</span><span class="hljs-params">(Schedule $schedule)</span>
    </span>{
        $schedule-&gt;command(<span class="hljs-string">'demo:cron'</span>)
                 -&gt;everyMinute();
    }
     
    <span class="hljs-comment">/**
     * Register the commands for the application.
     *
     * <span class="hljs-doctag">@return</span> void
     */</span>
    <span class="hljs-keyword">protected</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">commands</span><span class="hljs-params">()</span>
    </span>{
        <span class="hljs-keyword">$this</span>-&gt;load(<span class="hljs-keyword">__DIR__</span>.<span class="hljs-string">'/Commands'</span>);
     
        <span class="hljs-keyword">require</span> base_path(<span class="hljs-string">'routes/console.php'</span>);
    }
}</span></code></span></pre>


<p class="wp-block-paragraph"><strong><span class="has-inline-color has-primary-color">Step 4 :-</span></strong> Now We&#8217;re ready to run our cron. You can manually check using following command of your cron.Run bellow command:</p>


<pre class="wp-block-code"><span><code class="hljs language-css"><span class="hljs-selector-tag">php</span> <span class="hljs-selector-tag">artisan</span> <span class="hljs-selector-tag">schedule</span><span class="hljs-selector-pseudo">:run</span></code></span></pre>


<p class="wp-block-paragraph">After running above command, now you can check log file where we already print some text. So open your log file it looks like as bellow:</p>



<p class="wp-block-paragraph"><strong>storage/logs/laravel-2021-08-16.php</strong></p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="636" height="290" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-89.png" alt="" class="wp-image-19198" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-89.png 636w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-89-300x137.png 300w" sizes="auto, (max-width: 636px) 100vw, 636px" /></figure></div>



<p class="wp-block-paragraph">Now our Cron is Working fine, But we want to run cron at every minute in our Linux Server,  So for that folow the below Steps.</p>



<p class="has-text-align-center wp-block-paragraph"> =========================   <strong>NOTE</strong> <strong>START</strong>   ========================== </p>



<h1 class="has-text-align-center wp-block-heading">Crontab Date / Time Format</h1>



<div class="wp-block-image"><figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="351" height="224" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-92.png" alt="" class="wp-image-19245" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-92.png 351w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-92-300x191.png 300w" sizes="auto, (max-width: 351px) 100vw, 351px" /></figure></div>



<pre class="wp-block-preformatted"> * * * * *  command to execute
 │ │ │ │ │
 │ │ │ │ │
 │ │ │ │ └───── day of week(0-6)(0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0)
 │ │ │ └────────── month (1 - 12)
 │ │ └─────────────── day of month (1 - 31)
 │ └──────────────────── hour (0 - 23)
 └───────────────────────── min (0 - 59)</pre>



<p class="has-text-align-center wp-block-paragraph">=========================   <strong>NOTE</strong> <strong>END</strong>   ==========================</p>



<p class="wp-block-paragraph"><strong><span class="has-inline-color has-primary-color">Step 5 :-</span></strong> Now login into your server and navigate to <strong>/etc</strong> and run below command</p>


<pre class="wp-block-code"><span><code class="hljs">sudo crontab -e</code></span></pre>


<p class="wp-block-paragraph">After running command you&#8217;ll get output like below image, just select <strong>easiest</strong></p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="410" height="140" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-90.png" alt="" class="wp-image-19221" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-90.png 410w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-90-300x102.png 300w" sizes="auto, (max-width: 410px) 100vw, 410px" /></figure></div>



<p class="wp-block-paragraph">In my case it&#8217;s 2, so I typed 2 and hit enter.</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="801" height="338" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-91.png" alt="" class="wp-image-19225" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-91.png 801w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-91-300x127.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-91-768x324.png 768w" sizes="auto, (max-width: 801px) 100vw, 801px" /></figure></div>



<p class="wp-block-paragraph">now add single entry on crontab file</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">* * * * * php /path/to/artisan schedule:run <span class="hljs-number">1</span>&gt;&gt; <span class="hljs-regexp">/dev/</span><span class="hljs-literal">null</span> <span class="hljs-number">2</span>&gt;&amp;<span class="hljs-number">1</span>


OR

* * * * * cd /path-to-your-project &amp;&amp; php artisan schedule:run &gt;&gt; <span class="hljs-regexp">/dev/</span><span class="hljs-literal">null</span> <span class="hljs-number">2</span>&gt;&amp;<span class="hljs-number">1</span></code></span></pre>


<p class="wp-block-paragraph"> I&#8217;m running on my linux server so i&#8217;ve added path to my artisan file of my laravel project, see below </p>



<h2 class="wp-block-heading">my code</h2>


<pre class="wp-block-code"><span><code class="hljs language-javascript">* * * * * php /opt/lampp/htdocs/testingcronjob/artisan schedule:run <span class="hljs-number">1</span>&gt;&gt; <span class="hljs-regexp">/dev/</span><span class="hljs-literal">null</span> <span class="hljs-number">2</span>&gt;&amp;<span class="hljs-number">1</span></code></span></pre>


<p class="wp-block-paragraph">It&#8217;s Done. I hope this article help you.</p>



<p class="wp-block-paragraph">Keep Exploring.</p>



<p class="wp-block-paragraph">Thanks for reading.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Laravel Permissions to set on Storage folder on Linux.</title>
		<link>https://www.bestdevops.com/laravel-permissions-to-set-on-storage-folder-on-linux/</link>
		
		<dc:creator><![CDATA[Sushant Kumar]]></dc:creator>
		<pubDate>Mon, 16 Aug 2021 07:30:00 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[laravel application]]></category>
		<category><![CDATA[Laravel Permissions]]></category>
		<category><![CDATA[Laravel Permissions on Storage folder]]></category>
		<category><![CDATA[Linux Permissions for Laravel]]></category>
		<category><![CDATA[Storage folder Permissions]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=19025</guid>

					<description><![CDATA[When we Setup laravel project on linux server then we have to give permissions to all folder&#8217;s, sub-folder&#8217;s and files [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">When we Setup laravel project on linux server then we have to give permissions to all folder&#8217;s, sub-folder&#8217;s and files in laravel Storage folder. So, i&#8217;m providing the list of permission which you have to set in storage folder. I&#8217;m providing this list because we can&#8217;t set <strong>777</strong> permission to all folders, if we do then it&#8217;s may be a security concern.</p>



<p class="wp-block-paragraph">So i&#8217;m providing a complete list of each folder&#8217;s and sub-folder&#8217;s permissions.</p>



<ol class="wp-block-list"><li><strong>storage </strong>&#8211; <strong><span class="has-inline-color has-primary-color">755</span></strong>.<br><br></li><li><strong>storage/app</strong> &#8211; <strong><span class="has-inline-color has-primary-color">755</span></strong>.<br><strong>storage/app/public</strong> &#8211; <strong><span class="has-inline-color has-primary-color">755</span></strong>.<br><br></li><li><strong>storage/framework</strong> &#8211; <strong><span class="has-inline-color has-primary-color">755</span></strong>.<br><strong>storage/framework/views</strong> &#8211; <strong><span class="has-inline-color has-primary-color">777</span></strong>.<br><strong>storage/framework/testing</strong> &#8211; <strong><span class="has-inline-color has-primary-color">755</span></strong>.<br><strong>storage/framework/sessions</strong> &#8211; <strong><span class="has-inline-color has-primary-color">777</span></strong>.<br><strong>storage/framework/cache</strong> &#8211; <strong><span class="has-inline-color has-primary-color">755</span></strong>.<br></li><li><strong>storage/logs</strong> &#8211; <strong><span class="has-inline-color has-primary-color">755</span></strong>.</li></ol>



<p class="wp-block-paragraph">That&#8217;s all. Hope this article will solved your problem.</p>



<p class="wp-block-paragraph">Keep Exploring.</p>



<p class="wp-block-paragraph">Thanks for reading.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Find Public IP Address in Linux or Windows.</title>
		<link>https://www.bestdevops.com/how-to-find-public-ip-address-in-linux-or-windows/</link>
		
		<dc:creator><![CDATA[Sushant Kumar]]></dc:creator>
		<pubDate>Sat, 14 Aug 2021 07:10:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Find Public IP Address]]></category>
		<category><![CDATA[IP Address]]></category>
		<category><![CDATA[IP Address in Linux]]></category>
		<category><![CDATA[IP Address in Windows]]></category>
		<category><![CDATA[windows 10]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=19019</guid>

					<description><![CDATA[For Windows To find public ip address in windows just visit the below website it will show you the ip. [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="has-text-align-center wp-block-heading"><span class="has-inline-color has-primary-color">For Windows</span></h2>



<p class="wp-block-paragraph">To find public ip address in windows just visit the below website it will show you the ip.</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">https:<span class="hljs-comment">//www.whatismyip.com</span></code></span></pre>


<h2 class="has-text-align-center wp-block-heading"><span class="has-inline-color has-primary-color">For linux</span></h2>



<p class="wp-block-paragraph">If you are using terminal and want to find your public ip address, then you have to run the below command in your terminal</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">wget –O – –q https:<span class="hljs-comment">//checkip.amazonaws.com</span></code></span></pre>

<pre class="wp-block-code"><span><code class="hljs language-javascript">curl –s https:<span class="hljs-comment">//icanhazip.com</span></code></span></pre>


<div class="wp-block-image"><figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="655" height="100" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-69.png" alt="" class="wp-image-19020" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-69.png 655w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-69-300x46.png 300w" sizes="auto, (max-width: 655px) 100vw, 655px" /></figure></div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[Solved] Linux : How to uninstall Xampp in Linux (ubuntu) Machine.</title>
		<link>https://www.bestdevops.com/how-to-uninstall-xampp-in-linux-ubuntu-machine/</link>
		
		<dc:creator><![CDATA[Sushant Kumar]]></dc:creator>
		<pubDate>Fri, 13 Aug 2021 17:33:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[XAMPP]]></category>
		<category><![CDATA[linux xampp]]></category>
		<category><![CDATA[uninstall Xampp]]></category>
		<category><![CDATA[uninstall Xampp in Linux]]></category>
		<category><![CDATA[xampp]]></category>
		<category><![CDATA[xampp uninstall]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=19003</guid>

					<description><![CDATA[If You Want to uninstall Xampp from your linux machine, then follow the Below Steps :- Step 1 :- first [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">If You Want to uninstall Xampp from your linux machine, then follow the Below Steps :- </p>



<p class="wp-block-paragraph"><strong><span class="has-inline-color has-primary-color">Step 1 :-</span></strong> first Stop the server from running by below command</p>



<p class="has-text-align-center wp-block-paragraph"><strong><em>sudo /opt/lampp/lampp stop</em></strong></p>



<p class="wp-block-paragraph"><span class="has-inline-color has-primary-color"><strong>Step 2 :-</strong></span> Now run below command to uninstall Xampp.</p>



<p class="has-text-align-center wp-block-paragraph"><strong><em>sudo /opt/lampp/uninstall</em></strong></p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="578" height="251" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-66.png" alt="" class="wp-image-19004" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-66.png 578w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-66-300x130.png 300w" sizes="auto, (max-width: 578px) 100vw, 578px" /></figure></div>



<p class="wp-block-paragraph"><strong><em><span class="has-inline-color has-primary-color">Step 3 :-</span></em></strong> Now run the below command to remove Xampp All leftover files.</p>



<p class="has-text-align-center wp-block-paragraph"><strong><em>sudo rm -r /opt/lampp</em></strong></p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="555" height="227" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-67.png" alt="" class="wp-image-19005" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-67.png 555w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-67-300x123.png 300w" sizes="auto, (max-width: 555px) 100vw, 555px" /></figure></div>



<p class="wp-block-paragraph">As you can see in the screenshot, after running the command all files are removed and when xampp is also not starting, it means xampp is successfully uninstalled from our linux machine.</p>



<p class="wp-block-paragraph">That&#8217;s All. I hope this article helps you to uninstall xampp.</p>



<p class="wp-block-paragraph">Keep Exploring.</p>



<p class="wp-block-paragraph">Thanks for reading.</p>



<p class="wp-block-paragraph"> </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[Solved] Linux : How to install XAMPP on Linux (Ubuntu) machine.</title>
		<link>https://www.bestdevops.com/how-to-install-xampp-on-linux-ubuntu-machine/</link>
		
		<dc:creator><![CDATA[Sushant Kumar]]></dc:creator>
		<pubDate>Thu, 12 Aug 2021 05:51:05 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[XAMPP]]></category>
		<category><![CDATA[install XAMPP]]></category>
		<category><![CDATA[install XAMPP on Linux]]></category>
		<category><![CDATA[Ubuntu machine]]></category>
		<category><![CDATA[xampp]]></category>
		<category><![CDATA[XAMPP on Linux]]></category>
		<category><![CDATA[xampp ubuntu]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=19002</guid>

					<description><![CDATA[To Successfully Install Xampp in your Ubuntu Machine just follow the Below Steps carefully. Step 1 :- Login to your [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">To Successfully Install Xampp in your Ubuntu Machine just follow the Below Steps carefully.</p>



<p class="wp-block-paragraph"><strong><span class="has-inline-color has-primary-color">Step 1 :-</span></strong>  Login to your (Ubuntu) Machine. </p>



<p class="wp-block-paragraph"><strong><span class="has-inline-color has-primary-color">Step 2 :-</span></strong>  run the below command to download Xampp.</p>



<p class="has-text-align-center wp-block-paragraph"><em><strong>wget https://downloadsapachefriends.global.ssl.fastly.net/7.4.22/xampp-linux-x64-7.4.22-0-installer.run</strong></em></p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="422" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-68-1024x422.png" alt="" class="wp-image-19008" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-68-1024x422.png 1024w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-68-300x124.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-68-768x317.png 768w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-68.png 1121w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure></div>



<p class="wp-block-paragraph"><strong><span class="has-inline-color has-primary-color">Step 3 :-</span></strong> Go to root user by entering below command</p>



<p class="has-text-align-center wp-block-paragraph"><strong><em>sudo -s</em></strong></p>



<p class="wp-block-paragraph"><strong><span class="has-inline-color has-primary-color">Step 4 :-</span></strong> Now we give permission to execute to the downloaded xampp file. For that run,</p>



<p class="has-text-align-center wp-block-paragraph"> <strong><em>chmod 755 xampp-linux-x64-7.4.22-0-installer.run</em></strong></p>



<p class="wp-block-paragraph"><strong><span class="has-inline-color has-primary-color">Step 5 :-</span></strong> Now, we run the downloaded file for installation, for that run</p>



<p class="has-text-align-center wp-block-paragraph"><strong><em>sudo ./xampp-linux-x64-7.4.22-0-installer.run</em></strong></p>



<h2 class="has-text-align-center wp-block-heading">Output</h2>


<pre class="wp-block-code"><span><code class="hljs language-php">root@sushant-VirtualBox:/home/sushant<span class="hljs-comment"># sudo ./xampp-linux-x64-7.4.22-0-installer.run</span>
----------------------------------------------------------------------------
Welcome to the XAMPP Setup Wizard.

----------------------------------------------------------------------------
Select the components you want to install; clear the components you <span class="hljs-keyword">do</span> not want
to install. Click Next when you are ready to <span class="hljs-keyword">continue</span>.

XAMPP Core Files : Y (Cannot be edited)

XAMPP Developer Files &#91;Y/n] :y

Is the selection above correct? &#91;Y/n]: y

----------------------------------------------------------------------------
Installation Directory

XAMPP will be installed to /opt/lampp
Press &#91;Enter] to <span class="hljs-keyword">continue</span>:

----------------------------------------------------------------------------
Setup is now ready to begin installing XAMPP on your computer.

<span class="hljs-keyword">Do</span> you want to <span class="hljs-keyword">continue</span>? &#91;Y/n]: y

----------------------------------------------------------------------------
Please wait <span class="hljs-keyword">while</span> Setup installs XAMPP on your computer.

 Installing
 <span class="hljs-number">0</span>% ______________ <span class="hljs-number">50</span>% ______________ <span class="hljs-number">100</span>%
 <span class="hljs-comment">#########################################</span>

----------------------------------------------------------------------------
Setup has finished installing XAMPP on your computer.

root@sushant-VirtualBox:/home/sushant<span class="hljs-comment">#</span>
</code></span></pre>


<p class="wp-block-paragraph"><strong><span class="has-inline-color has-primary-color">Step 6 :-</span></strong> Installation Done. Now we want to start server for that run,</p>



<p class="has-text-align-center wp-block-paragraph"><strong><em>sudo /opt/lampp/lampp start </em></strong></p>



<p class="wp-block-paragraph">List of commands to start, stop and restart server</p>



<p class="wp-block-paragraph"> To Start Server :- <strong><em>sudo /opt/lampp/lampp start </em></strong> </p>



<p class="wp-block-paragraph">To Stop Server :-  <strong><em>sudo /opt/lampp/lampp stop</em></strong></p>



<p class="wp-block-paragraph">To Restart Server :-  <strong><em>sudo /opt/lampp/lampp restart </em></strong> </p>



<p class="wp-block-paragraph">That&#8217;s all, I hope this article helps you to solve your problem.</p>



<p class="wp-block-paragraph">Keep Exploring.</p>



<p class="wp-block-paragraph">Thanks for reading.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>httpd-xampp.conf: How to allow access to an external IP besides localhost in phpmyadmin for ubuntu?</title>
		<link>https://www.bestdevops.com/httpd-xampp-conf-how-to-allow-access-to-an-external-ip-besides-localhost-in-phpmyadmin-for-ubuntu/</link>
		
		<dc:creator><![CDATA[Sushant Kumar]]></dc:creator>
		<pubDate>Tue, 10 Aug 2021 07:53:56 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySql]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=18979</guid>

					<description><![CDATA[If you want to access phpMyAdmin from a static IP besides localhost, then you&#8217;re in right place, just follow the [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">If you want to access phpMyAdmin from a static IP besides localhost, then you&#8217;re in right place, just follow the below steps :- </p>



<p class="wp-block-paragraph"><strong><span class="has-inline-color has-primary-color">Step 1 :-</span></strong>  First locate <strong>httpd-xampp.conf</strong> file, for <strong>Ubuntu </strong>it&#8217;s located at  <strong>/opt/lampp/etc/extra/</strong> </p>



<p class="wp-block-paragraph"><strong><span class="has-inline-color has-primary-color">Step 2 :-</span></strong> open  <strong>httpd-xampp.conf</strong> file for editing. you&#8217;ll find something live below code </p>



<p class="wp-block-paragraph"> </p>


<pre class="wp-block-code"><span><code class="hljs language-php"><span class="hljs-comment"># New XAMPP security concept</span>
<span class="hljs-comment">#</span>
&lt;LocationMatch <span class="hljs-string">"^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))"</span>&gt;
    <span class="hljs-keyword">Require</span> local
    ErrorDocument <span class="hljs-number">403</span> /error/XAMPP_FORBIDDEN.html.<span class="hljs-keyword">var</span>
&lt;/LocationMatch&gt;</code></span></pre>


<p class="wp-block-paragraph"><strong><span class="has-inline-color has-primary-color">Step 3 :-</span></strong> add <em><strong>Require ip your_ip_address</strong></em> below  <em><strong>Require local </strong></em>.</p>


<pre class="wp-block-code"><span><code class="hljs language-php"><span class="hljs-comment"># New XAMPP security concept</span>
<span class="hljs-comment">#</span>
&lt;LocationMatch <span class="hljs-string">"^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))"</span>&gt;
    <span class="hljs-keyword">Require</span> local
    <span class="hljs-keyword">Require</span> ip <span class="hljs-number">10.0</span><span class="hljs-number">.0</span><span class="hljs-number">.1</span>  <span class="hljs-comment">// provide your static ip here.</span>
    ErrorDocument <span class="hljs-number">403</span> /error/XAMPP_FORBIDDEN.html.<span class="hljs-keyword">var</span>
&lt;/LocationMatch&gt;</code></span></pre>


<p class="wp-block-paragraph"><strong><span class="has-inline-color has-primary-color">Step 4 :-</span><em><span class="has-inline-color has-primary-color"> </span></em></strong> Add your static IP address after <strong>Require ip</strong> your_static_ip. </p>



<p class="wp-block-paragraph">It&#8217;s Done.</p>



<p class="wp-block-paragraph">Now Check to access <span class="has-inline-color has-primary-color">your_ip_address/phpmyadmin</span></p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Setup Virtual Hosts with Apache Web Server on Linux</title>
		<link>https://www.bestdevops.com/setup-virtual-hosts-with-apache-web-server-on-linux/</link>
		
		<dc:creator><![CDATA[pradeep]]></dc:creator>
		<pubDate>Mon, 09 Aug 2021 09:34:09 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Vmware]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[virtualhosts]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=18889</guid>

					<description><![CDATA[First thing you need to do is to install apache in your machine. Apache Installation Apache gives its functionality and [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">First thing you need to do is to install apache in your machine.</h2>



<h3 class="wp-block-heading">Apache Installation</h3>



<p class="wp-block-paragraph">Apache gives its functionality and the components to individual units which can be customized and configured independently. The basic unit that describes a site or a domain is called a virtual host.</p>



<p class="wp-block-paragraph">This allows the administrator to use one server to host multiple domains or sites with a single interface or IP address by using a mechanism.</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">$ sudo apt-<span class="hljs-keyword">get</span> update
$ sudo apt-<span class="hljs-keyword">get</span> install apache2</code></span></pre>


<h3 class="wp-block-heading">Create the Directory Structure</h3>



<p class="wp-block-paragraph">A directory structure shall hold the site information and data which will be served to visitors. By default, the top-level directory for apache is /var/www and we will be setting them to the individual directories under the /var/www directory for each site/domain.</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">$ sudo mkdir -p /<span class="hljs-keyword">var</span>/www/firstSite.com
$ sudo mkdir -p /<span class="hljs-keyword">var</span>/www/secondSite.com</code></span></pre>


<h3 class="wp-block-heading">Grant Permissions</h3>



<p class="wp-block-paragraph">Our directory&#8217;s owned by our root user. If we want our normal user to be able to modify files in our web directories, then we have to change the ownership to others normal users.</p>


<pre class="wp-block-code"><span><code class="hljs language-php">$ sudo chown -R $USER:$USER /<span class="hljs-keyword">var</span>/www/firstSite.com
$ sudo chown -R $USER:$USER /<span class="hljs-keyword">var</span>/www/secondSite.com
$ sudo chmod -R <span class="hljs-number">755</span> /<span class="hljs-keyword">var</span>/www</code></span></pre>


<h3 class="wp-block-heading">Create Demo Pages for for both sites.</h3>



<p class="wp-block-paragraph">To create a file we use touch command, The <em>touch command</em> is a standard command used in UNIX/<em>Linux</em> operating system which is used to create, change and modify timestamps of a file.</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">$ touch /<span class="hljs-keyword">var</span>/www/webserver1.com/index.html</code></span></pre>


<p class="wp-block-paragraph">Then put some lines of html.</p>


<pre class="wp-block-code"><span><code class="hljs language-xml"><span class="hljs-meta">&lt;!DOCTYPE <span class="hljs-meta-keyword">html</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">html</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>Site one<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>

<span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Site one heading<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>My first paragraph.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>

<span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
</code></span></pre>


<p class="wp-block-paragraph">We&#8217;ll copy and past the same page for second server and modify it accordingly</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">$ cp /<span class="hljs-keyword">var</span>/www/firstSite.com/index.html /<span class="hljs-keyword">var</span>/www/secondSite.com/index.html</code></span></pre>

<pre class="wp-block-code"><span><code class="hljs language-xml">$ nano /var/www/webserver2.com/index.html
<span class="hljs-tag">&lt;<span class="hljs-name">html</span>&gt;</span>
   <span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>Welcome to secondSite.com!<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
   <span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>
   <span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Success!<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
   <span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span></code></span></pre>


<h3 class="wp-block-heading">Create New Virtual Host Files</h3>


<pre class="wp-block-code"><span><code class="hljs language-javascript">$ sudo cp /etc/apache2/sites-available/<span class="hljs-number">000</span>-<span class="hljs-keyword">default</span>.conf /etc/apache2/sites-available/firstSite.conf
$ sudo nano /etc/apache2/sites-available/firstSite.com.conf</code></span></pre>

<pre class="wp-block-code"><span><code class="hljs language-xml"><span class="hljs-tag">&lt;<span class="hljs-name">VirtualHost</span> *<span class="hljs-attr">:80</span>&gt;</span>
   ServerAdmin admin@firstSite.com
   ServerName firstSite.com
   ServerAlias www.firstSite.com
   DocumentRoot /var/www/firstSite.com/
   ErrorLog ${APACHE_LOG_DIR}/error.log
   CustomLog ${APACHE_LOG_DIR}/access.log combined
<span class="hljs-tag">&lt;/<span class="hljs-name">VirtualHost</span>&gt;</span></code></span></pre>


<p class="wp-block-paragraph">Copy First Virtual Host file and customize for Second Domain webserver2.com</p>



<pre class="wp-block-preformatted">$ sudo cp /etc/apache2/sites-available/firstSite.com.conf /etc/apache2/sites-available/secondSite.com.conf
$ sudo nano /etc/apache2/sites-available/secondSite.com.conf</pre>



<p class="wp-block-paragraph">Do the same thing for secondSite VH</p>


<pre class="wp-block-code"><span><code class="hljs language-xml"><span class="hljs-tag">&lt;<span class="hljs-name">VirtualHost</span> *<span class="hljs-attr">:80</span>&gt;</span>
   ServerAdmin admin@secondSite.com
   ServerName secondSite.com
   ServerAlias www.secondSite.com
   DocumentRoot /var/www/secondSite.com/
   ErrorLog ${APACHE_LOG_DIR}/error.log
   CustomLog ${APACHE_LOG_DIR}/access.log combined
<span class="hljs-tag">&lt;/<span class="hljs-name">VirtualHost</span>&gt;</span></code></span></pre>


<h3 class="wp-block-heading">Enable the New Virtual Host Files</h3>


<pre class="wp-block-code"><span><code class="hljs">$ sudo a2ensite webserver1.com.conf
$ sudo a2ensite webserver2.com.conf</code></span></pre>


<p class="wp-block-paragraph">We needed to restart Apache server</p>


<pre class="wp-block-code"><span><code class="hljs">$ sudo service apache2 restart</code></span></pre>


<h3 class="wp-block-heading">Testing the Websites</h3>


<pre class="wp-block-code"><span><code class="hljs">$ sudo /etc/hosts</code></span></pre>


<pre class="wp-block-preformatted">192.168.1.84 website1.com
192.168.1.84 website1.com</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>What are Linux Users, Groups and Permissions</title>
		<link>https://www.bestdevops.com/what-are-linux-users-and-groups-and-permissions/</link>
		
		<dc:creator><![CDATA[pradeep]]></dc:creator>
		<pubDate>Sat, 07 Aug 2021 09:36:42 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[user]]></category>
		<category><![CDATA[userGroups]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=18834</guid>

					<description><![CDATA[If you are new to Linux/Unix, then the concept of permissions may be confusing. This guide provides you with an [&#8230;]]]></description>
										<content:encoded><![CDATA[
<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>If you are new to Linux/Unix, then the concept of permissions may be confusing. This guide provides you with an explanation of what permissions are, how they work, and how to manage them. A number of examples are provided to illustrate how to set and change permissions for both users and groups.</p></blockquote>



<h2 class="wp-block-heading" id="what-are-linux-user-and-group-permissions">What are Linux User and Group Permissions?</h2>



<p class="wp-block-paragraph">Linux/Unix operating systems have the ability to multitask in a manner similar to other operating systems. However, Linux’s major difference from other operating systems is its ability to have multiple users. Linux was designed to allow more than one user to have access to the system at the same time. In order for this multiuser design to work properly, there needs to be a method to protect users from each other. This is where permissions come in to play.</p>



<h3 class="wp-block-heading" id="read-write--execute-permissions">Read, Write, &amp; Execute Permissions</h3>



<p class="wp-block-paragraph">Permissions are the “rights” to act on a file or directory. The basic rights are read, write, and execute.</p>



<ul class="wp-block-list"><li><strong>Read</strong>: a readable permission allows the contents of the file to be viewed. A read permission on a directory allows you to list the contents of a directory.</li><li><strong>Write</strong>: a write permission on a file allows you to modify the contents of that file. For a directory, the write permission allows you to edit the contents of a directory (e.g. add/delete files).</li><li><strong>Execute</strong>: for a file, the executable permission allows you to run the file and execute a program or script. For a directory, the execute permission allows you to change to a different directory and make it your current working directory. Users usually have a default group, but they may belong to several additional groups.</li></ul>



<h3 class="wp-block-heading" id="viewing-file-permissions">Viewing File Permissions</h3>



<p class="wp-block-paragraph">To view the permissions on a file or directory, issue the command&nbsp;<code>ls -l &lt;directory/file&gt;</code>. Remember to replace the information in the&nbsp;<code>&lt;directory/file&gt;</code>&nbsp;with the actual file or directory name. Below is sample output for the&nbsp;<code>ls</code>&nbsp;command:</p>


<pre class="wp-block-code"><span><code class="hljs">-rw-r--r-- 1 root root 1031 Nov 18 09:22 /etc/passwd</code></span></pre>


<ul class="wp-block-list"><li>The first ten characters show the access permissions. </li><li>The first dash (<code>-</code>) indicates the type of file (<code>d</code>&nbsp;for directory,&nbsp;<code>s</code>&nbsp;for special file and&nbsp;<code>-</code>&nbsp;for a regular file).</li><li> The next three characters (<code>rw-</code>) define the owner’s permission to the file.</li></ul>



<p class="wp-block-paragraph"> In this example, the file owner has read and write permissions only. The next three characters (<code>r--</code>) are the permissions for the members of the same group as the file owner (which in this example is read only). The last three characters (<code>r--</code>) show the permissions for all other users and in this example it is read only.</p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-56.png" alt="" class="wp-image-18839" width="574" height="287" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-56.png 596w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-56-300x150.png 300w" sizes="auto, (max-width: 574px) 100vw, 574px" /></figure>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Deploy a Laravel project to ubuntu server using git</title>
		<link>https://www.bestdevops.com/deploy-a-laravel-project-to-ubuntu-server-using-git/</link>
		
		<dc:creator><![CDATA[pradeep]]></dc:creator>
		<pubDate>Fri, 06 Aug 2021 12:53:48 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[gitbash]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[xampp]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=18823</guid>

					<description><![CDATA[Steps to create project in local machine Step :1 Create a folder anywhere in your local computer with any name [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Steps to create project in local machine</h2>



<h3 class="wp-block-heading">Step :1 Create a folder anywhere in your local computer with any name (Mine is workspace)</h3>



<p class="wp-block-paragraph"></p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="127" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-49-1024x127.png" alt="" class="wp-image-18824" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-49-1024x127.png 1024w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-49-300x37.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-49-768x96.png 768w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-49.png 1141w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption>You can go for any name you want</figcaption></figure>



<h3 class="wp-block-heading">Step:2 Make sure git and gitbash is installed in your local machine if not download it from <a href="https://git-scm.com/downloads" target="_blank" rel="noreferrer noopener">here</a></h3>



<h3 class="wp-block-heading">Step:3 Login into your GitHub account and create a repository</h3>



<p class="wp-block-paragraph"></p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-50.png" alt="" class="wp-image-18825" width="623" height="649" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-50.png 698w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-50-288x300.png 288w" sizes="auto, (max-width: 623px) 100vw, 623px" /></figure>



<h3 class="wp-block-heading">Step 4: Clone the repository into your local machine </h3>



<ul class="wp-block-list"><li>get inside your repository </li></ul>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="912" height="354" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-51.png" alt="" class="wp-image-18826" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-51.png 912w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-51-300x116.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-51-768x298.png 768w" sizes="auto, (max-width: 912px) 100vw, 912px" /></figure>



<ul class="wp-block-list"><li>Copy the URL under HTTPS area </li><li>There are many more ways to clone a repo but for time being use this method </li><li>Now get inside our workspace folder that we created before (local/workspace)</li><li>right click and open git bash or command line inside the folder </li></ul>



<p class="wp-block-paragraph"></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="843" height="390" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-52.png" alt="" class="wp-image-18827" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-52.png 843w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-52-300x139.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-52-768x355.png 768w" sizes="auto, (max-width: 843px) 100vw, 843px" /></figure>



<ul class="wp-block-list"><li>Run these git commands to get started </li></ul>


<pre class="wp-block-code"><span><code class="hljs">git init </code></span></pre>


<pre class="wp-block-preformatted">This is to&nbsp;initialize a new, empty repository </pre>


<pre class="wp-block-code"><span><code class="hljs language-php">git <span class="hljs-keyword">clone</span> https:<span class="hljs-comment">//github.com/pradeeprjth/laravelTestingProject.git &#91;HTTPS_URL_YOU_COPYED_FROM_GITHUB] </span></code></span></pre>


<pre class="wp-block-preformatted">This will clone everything stored in your remote repository into your local folder/repository
You will find a folder with the same name you created your repository </pre>



<h3 class="wp-block-heading">Step :5 paste your project/code inside the folder you just clone from the repository </h3>



<p class="wp-block-paragraph"></p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-53.png" alt="" class="wp-image-18828" width="691" height="563" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-53.png 691w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-53-300x244.png 300w" sizes="auto, (max-width: 691px) 100vw, 691px" /></figure>



<ul class="wp-block-list"><li>Again run the below commands to push all the changes and codes back to the repository </li><li>Right click and open your git bash or cmd inside the folder </li></ul>


<pre class="wp-block-code"><span><code class="hljs">git add .</code></span></pre>


<pre class="wp-block-preformatted">The git add command&nbsp;<strong>adds a file to the Git staging area</strong>. This area contains a list of all the files you have recently changed.</pre>


<pre class="wp-block-code"><span><code class="hljs language-javascript">git commit -m<span class="hljs-string">"first_commit"</span></code></span></pre>


<pre class="wp-block-preformatted"><em>git commit</em>&nbsp;creates a commit, which is like a snapshot of your repository. These commits are snapshots of your entire repository at specific times. and you need to specify a commit message using -m flag including double quote</pre>


<pre class="wp-block-code"><span><code class="hljs">git push origin master    or    git push origin main </code></span></pre>


<pre class="wp-block-preformatted">git push -u origin master is&nbsp;<strong>used for pushing local content to GitHub</strong></pre>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-54.png" alt="" class="wp-image-18829" width="725" height="460" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-54.png 935w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-54-300x191.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-54-768x488.png 768w" sizes="auto, (max-width: 725px) 100vw, 725px" /><figcaption>Sorry for the CLI style I like it in this way </figcaption></figure>



<p class="wp-block-paragraph"></p>



<h3 class="wp-block-heading">Step 6: Login to your remote machine or ubuntu machine and make sure xampp and composer is installed in that machine.</h3>



<p class="wp-block-paragraph">Follow this blog if xampp and composer are not installed in your remote/ubuntu machine </p>



<h3 class="wp-block-heading">1. Installed Xampp</h3>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><a href="https://www.devopsschool.com/blog/installing-xampp-7-4-xxx-on-ubuntu/">How to install and Configure XAMPP on Ubuntu?</a></p><cite>This blog is written by Rajesh thanks to him.</cite></blockquote>



<h3 class="wp-block-heading">2. Another thing which is required is Composer</h3>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><a href="https://www.bestdevops.com/install-composer-using-cli-in-ubuntu-globally/">Install composer using CLI in ubuntu (Globally)</a></p><cite>Follow this to install composer in your machine using CLI</cite></blockquote>



<h3 class="wp-block-heading">Stpe :7 Go to your htdocs folder or if you have lampp then www  folder and run below commands</h3>


<pre class="wp-block-code"><span><code class="hljs">git init </code></span></pre>


<pre class="wp-block-preformatted"> This is to&nbsp;initialize a new, empty repository but this time inside your remote machine </pre>


<pre class="wp-block-code"><span><code class="hljs language-php">git <span class="hljs-keyword">clone</span> https:<span class="hljs-comment">//github.com/pradeeprjth/laravelTestingProject.git &#91;HTTPS_URL_YOU_COPYED_FROM_GITHUB]</span></code></span></pre>


<pre class="wp-block-preformatted">Now as we already have pushed all our code into our repository so we'll get all the files folder into our htdocs folder or www folder </pre>



<h3 class="wp-block-heading">Step 8: Now to run the project we need to do some configuration </h3>



<ul class="wp-block-list"><li>Copy the .env.example file to .env coz git ignore some files and folder including our vendor folder which contains all our Laravel project files . To do this run the below command.</li></ul>


<pre class="wp-block-code"><span><code class="hljs language-css"><span class="hljs-selector-tag">cp</span> <span class="hljs-selector-class">.env</span><span class="hljs-selector-class">.example</span> <span class="hljs-selector-class">.env</span></code></span></pre>


<ul class="wp-block-list"><li>Install composer, as git ignores our vendor folder in order to get it back we need to run </li></ul>


<pre class="wp-block-code"><span><code class="hljs">composer install</code></span></pre>


<ul class="wp-block-list"><li>You may get an error while composer install </li><li><em>Class &#8216;Illuminate\Support\facades\Schema not found </em></li><li>In order to solve this go to your project folder in local and inside C:\xampp\htdocs\WrokSpace\laravelTestproject\app\Providers\AppServiceProvider.php</li><li>use this class in the top <br>use Illuminate\Support\Facades\Schema;</li></ul>



<ul class="wp-block-list"><li>Next thing is to set the APP_KEY value in your .env file, run the command below </li></ul>


<pre class="wp-block-code"><span><code class="hljs language-css"><span class="hljs-selector-tag">php</span> <span class="hljs-selector-tag">artisan</span> <span class="hljs-selector-tag">key</span><span class="hljs-selector-pseudo">:generate</span></code></span></pre>


<h3 class="wp-block-heading">Step 9: Now go to your browser and put your ip followed by the project name /public to visit the application</h3>



<h3 class="wp-block-heading">  </h3>


<pre class="wp-block-code"><span><code class="hljs language-javascript">http:<span class="hljs-comment">//90.437.1965.252/laravelTestproject/public/</span></code></span></pre>


<p class="wp-block-paragraph">That&#8217;s it hope it help&#8217;s someone out there.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Permissions required to make a Laravel project up and running in ubuntu (Linux)</title>
		<link>https://www.bestdevops.com/permissions-required-to-make-a-laravel-project-up-and-running-in-ubuntu-linux/</link>
		
		<dc:creator><![CDATA[pradeep]]></dc:creator>
		<pubDate>Fri, 06 Aug 2021 11:04:26 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[permission_denied]]></category>
		<category><![CDATA[session]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=18807</guid>

					<description><![CDATA[Before moving further, hope you have already installed xampp and composer in your machine.if not follow the below blog to [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Before moving further, hope you have already installed xampp and composer in your machine.<br>if not follow the below blog to do so.</h2>



<figure class="wp-block-embed is-type-wp-embed is-provider-devops-devsecops-sre-dataops-aiops wp-block-embed-devops-devsecops-sre-dataops-aiops"><div class="wp-block-embed__wrapper">
<blockquote class="wp-embedded-content" data-secret="ipO4OKcLIx"><a href="https://www.bestdevops.com/install-a-laravel-project-inside-htdocs-folder-in-ubuntu/">Install a Laravel project inside htdocs folder in ubuntu</a></blockquote><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="&#8220;Install a Laravel project inside htdocs folder in ubuntu&#8221; &#8212; Best DevOps" src="https://www.bestdevops.com/install-a-laravel-project-inside-htdocs-folder-in-ubuntu/embed/#?secret=J1P7D2j1fx#?secret=ipO4OKcLIx" data-secret="ipO4OKcLIx" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</div></figure>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="636" height="186" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-48.png" alt="" class="wp-image-18808" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-48.png 636w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-48-300x88.png 300w" sizes="auto, (max-width: 636px) 100vw, 636px" /></figure>



<h1 class="wp-block-heading">First permission:</h1>



<p class="wp-block-paragraph">As you know the first thing our browser needs to run a Laravel project is, the index file which is located in the public folder <br>so we need to make it read and writable so that our browser can access it and if required can modify it.</p>



<p class="wp-block-paragraph">Run the below command to grant access to the public folder </p>


<pre class="wp-block-code"><span><code class="hljs language-php">cd /opt/lampp/htdocs/YOUR_PROJECT
sudo chmod -R +rw <span class="hljs-keyword">public</span></code></span></pre>


<h1 class="wp-block-heading">Second permission:</h1>



<p class="wp-block-paragraph">The next permission if for the storage folder, as you already know when our Laravel projects runs it create some logs files automatically if any error found in you code base, </p>



<p class="wp-block-paragraph">Run the below command to grant access to the logs folder </p>


<pre class="wp-block-code"><span><code class="hljs">cd /opt/lampp/htdocs/YOUR_PROJECT
sudo chmod -R +rw storage</code></span></pre>


<h1 class="wp-block-heading">Third permission:</h1>



<p class="wp-block-paragraph">At the end, the final permission we have to give to our session folder which is located inside our <strong>storage/framework</strong> folder,<br>and every time we hit our project URL a new random session key is generated, that get stored in our session folder <br>so all of them are necessary to run a Laravel project </p>



<p class="wp-block-paragraph">Run the below command to grand access to the <strong>framework </strong>and session </p>


<pre class="wp-block-code"><span><code class="hljs">sudo chmod -R 775 framework
sudo chmod -R 775 session</code></span></pre>


<p class="wp-block-paragraph">That&#8217;s it, these all works for me hope it for you too </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Install a Laravel project inside htdocs folder in ubuntu</title>
		<link>https://www.bestdevops.com/install-a-laravel-project-inside-htdocs-folder-in-ubuntu/</link>
		
		<dc:creator><![CDATA[pradeep]]></dc:creator>
		<pubDate>Fri, 06 Aug 2021 09:49:10 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[composer]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[mbstring]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[xampp]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=18793</guid>

					<description><![CDATA[I was moving a Laravel project to a ubuntu virtual machine.Steps that I followed: 1. Installed Xampp 2. Another thing [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">I was moving a Laravel project to a  ubuntu  virtual machine.<br>Steps that I followed:</h3>



<h3 class="wp-block-heading">1.  Installed Xampp </h3>



<figure class="wp-block-embed is-type-wp-embed is-provider-devopsschool-com wp-block-embed-devopsschool-com"><div class="wp-block-embed__wrapper">
<blockquote class="wp-embedded-content" data-secret="lwILFIsreb"><a href="https://www.devopsschool.com/blog/installing-xampp-7-4-xxx-on-ubuntu/">How to install  and Configure XAMPP  on Ubuntu?</a></blockquote><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="&#8220;How to install  and Configure XAMPP  on Ubuntu?&#8221; &#8212; DevOpsSchool.com" src="https://www.devopsschool.com/blog/installing-xampp-7-4-xxx-on-ubuntu/embed/#?secret=AiPeZ0yBbG#?secret=lwILFIsreb" data-secret="lwILFIsreb" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</div><figcaption>By following this blog i was successfully xampp running on my machine. Thanks to the auther Rajesh Kumar</figcaption></figure>



<h3 class="wp-block-heading">2. Another thing which is required is Composer </h3>



<figure class="wp-block-embed is-type-wp-embed is-provider-devops-devsecops-sre-dataops-aiops wp-block-embed-devops-devsecops-sre-dataops-aiops"><div class="wp-block-embed__wrapper">
<blockquote class="wp-embedded-content" data-secret="ep8po4mbU8"><a href="https://www.bestdevops.com/install-composer-using-cli-in-ubuntu-globally/">Install composer using CLI in ubuntu (Globally)</a></blockquote><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="&#8220;Install composer using CLI in ubuntu (Globally)&#8221; &#8212; Best DevOps" src="https://www.bestdevops.com/install-composer-using-cli-in-ubuntu-globally/embed/#?secret=EhSiZXmf7j#?secret=ep8po4mbU8" data-secret="ep8po4mbU8" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</div></figure>



<h3 class="wp-block-heading">3. Now the thing is when we try to install Laravel project inside our htdocs folder it through an error</h3>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="884" height="260" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-42.png" alt="" class="wp-image-18795" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-42.png 884w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-42-300x88.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-42-768x226.png 768w" sizes="auto, (max-width: 884px) 100vw, 884px" /></figure>



<p class="wp-block-paragraph"></p>



<h3 class="wp-block-heading">4. To resolve this error first create a folder inside your htdocs.</h3>


<pre class="wp-block-code"><span><code class="hljs">mkdir Projects</code></span></pre>


<h3 class="wp-block-heading">5 grant read and write permissions to this folder by running this commands</h3>


<pre class="wp-block-code"><span><code class="hljs">sude chmod +rw Projects</code></span></pre>


<h3 class="wp-block-heading">6. You may get another error while installing is (&#8220;mbstring&#8221; extension is missing.)</h3>



<p class="wp-block-paragraph">Run the below commands to resolve these errors</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">sudo apt-<span class="hljs-keyword">get</span> install php-mbstring
</code></span></pre>

<pre class="wp-block-code"><span><code class="hljs">sudo su - root
</code></span></pre>


<h3 class="wp-block-heading">7. That&#8217;s it now try installing your project again </h3>


<pre class="wp-block-code"><span><code class="hljs language-javascript">composer create-project --prefer-dist laravel/laravel testProject <span class="hljs-string">"5.8.*"</span></code></span></pre>


<p class="wp-block-paragraph">That&#8217;s it, Hope it help someone out there.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>require ext-dom * -&gt; it is missing from your system. Install or enable PHP&#8217;s dom extension.</title>
		<link>https://www.bestdevops.com/require-ext-dom-it-is-missing-from-your-system-install-or-enable-phps-dom-extension/</link>
		
		<dc:creator><![CDATA[pradeep]]></dc:creator>
		<pubDate>Fri, 06 Aug 2021 07:22:56 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[installPHPComposer]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php&#039;s_domExtenstion]]></category>
		<category><![CDATA[project]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=18755</guid>

					<description><![CDATA[Make sure you are in htdocs folder while executing the commands. I was trying to install Laravel in a Ubuntu [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading"><strong>Make sure you are in htdocs folder while executing the commands.</strong></h2>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-40.png" alt="" class="wp-image-18766" width="523" height="446" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-40.png 737w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-40-300x256.png 300w" sizes="auto, (max-width: 523px) 100vw, 523px" /></figure>



<h2 class="wp-block-heading">I was trying to install Laravel in a Ubuntu virtual machine and got this error </h2>



Your requirements could not be resolved to an installable set of packages.
  Problem 1
    &#8211; phpunit/phpunit[7.5.0, &#8230;, 7.5.20] require ext-dom * -&gt; it is missing from your system. Install or enable PHP&#8217;s dom extension.
    &#8211; Root composer.json requires phpunit/phpunit ^7.5 -&gt; satisfiable by phpunit/phpunit[7.5.0, &#8230;, 7.5.20].



<h3 class="wp-block-heading">And To enable extensions, verify that they are enabled in your .ini files:</h3>



<p class="wp-block-paragraph">But in your server you&#8217;re missing&nbsp;<code>ext-dom</code>.&nbsp;<code>php-xml</code>&nbsp;has all the related packages you need. So, you can simply install it by running:</p>


<pre class="wp-block-code"><span><code class="hljs">sudo apt install php-xml</code></span></pre>


<h3 class="wp-block-heading">Most likely you are missing&nbsp;<code>mbstring</code>&nbsp;too. If you get the error, install this package as well with:</h3>


<pre class="wp-block-code"><span><code class="hljs language-javascript">sudo apt-<span class="hljs-keyword">get</span> install php-mbstring</code></span></pre>


<h3 class="wp-block-heading">Then run:</h3>


<pre class="wp-block-code"><span><code class="hljs language-javascript">composer update
composer <span class="hljs-built_in">require</span> cviebrock/eloquent-sluggable</code></span></pre>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
