To Start the Nginx Server
sudo systemctl start nginx
To Stop the Nginx Server
sudo systemctl stop nginx
To Restart the Nginx Server
| #!/bin/bash | |
| # Set DEBIAN_FRONTEND to noninteractive to avoid prompts | |
| export DEBIAN_FRONTEND=noninteractive | |
| # Update package list and upgrade existing packages | |
| sudo apt update && sudo apt upgrade -y | |
| # Install Nginx | |
| sudo apt install nginx -y |
| <!DOCTYPE html> | |
| <html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="h-full"> | |
| <title>{{ config('app.name', 'Laravel') }}</title> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <meta name="csrf-token" content="{{ csrf_token() }}"> | |
| <link rel="preconnect" href="https://fonts.bunny.net"> |
| <?php | |
| # Filename : app/helpers.php | |
| use Illuminate\Support\Str; | |
| if (!function_exists('calculateReadingTime')) { | |
| function calculateReadingTime($content) | |
| { | |
| $word_count = Str::wordCount($content); | |
| $reading_time = ceil($word_count / 200); |
| <?php | |
| use GuzzleHttp\Client; | |
| use Illuminate\Support\Facades\Log; | |
| function sendTelegramNotification($botKey,$chatId, $message) { | |
| try { | |
| $botToken = $botKey; | |
| $apiEndpoint = "https://api.telegram.org/bot{$botToken}/sendMessage"; |
| #!/bin/bash | |
| # Step 1: Install Composer if not already installed | |
| if ! [ -x "$(command -v composer)" ]; then | |
| echo "Composer is not installed. Installing..." | |
| php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
| php composer-setup.php --install-dir=/usr/local/bin --filename=composer | |
| php -r "unlink('composer-setup.php');" | |
| fi |
| <?php | |
| function ___wejns_wp_sitemap_fix($arg) { | |
| $allowed = false; | |
| $found = false; | |
| foreach (headers_list() as $header) { | |
| if (preg_match("/^content-type:\\s+(text\\/|application\\/((xhtml|atom|rss)\\+xml|xml))/i", $header)) { | |
| $allowed = true; | |
| } | |
| if (preg_match("/^content-type:\\s+/i", $header)) { |
| server { | |
| listen 80; | |
| server_name localhost; | |
| root /var/www/phalcon/public; #root_path | |
| index index.php; | |
| charset utf-8; | |
| location / { | |
| try_files $uri $uri/ /index.php?_url=$uri&$args; | |
| } |
To Start the Nginx Server
sudo systemctl start nginx
To Stop the Nginx Server
sudo systemctl stop nginx
To Restart the Nginx Server
To start the Apache server:
sudo systemctl start apache2
To stop the Apache server:
sudo systemctl stop apache2
To stop and then start Apache
sudo systemctl restart apache2
To reload apache server to update the new configurations
| import { SiteLinksSearchBoxJsonLd } from 'next-seo'; | |
| const SiteLinksSearchBox = () => ( | |
| <> | |
| <SiteLinksSearchBoxJsonLd | |
| url="https://dhanar98.hashnode.dev/" | |
| potentialActions={[ | |
| { | |
| target: 'https://dhanar98.hashnode.dev/search?q', | |
| queryInput: 'search_term_string', |