SlideShare a Scribd company logo
Gaurav Mishra
<gmishx@gmail.com>
Linux - 5
Apache Configuration file,
Cron jobs,
Proxy server
2/27/2018
Unrestricted
Gaurav Mishra <gmishx@gmail.com>
Apache http server
• One of the most commonly used open source sever
• Can be easily tuned
• Works in harmony with PHP
• Provides various security measures
• Installs as httpd in many Linux distros
• Packages as apache2 in Debian based distributions
2/27/2018
Gaurav Mishra <gmishx@gmail.com>
Apache directory structure
• The apache foundation have their hierarchical structure for the respective
configuration files.
• The root is located at: /etc/apache2/
• The main configuration file is located at ./apache2.conf
• The modules currently installed are located at: ./mods-available/
• The modules currently in use are located at: ./mods-enabled/
• The websites/virtual host available for current install are located at: ./sites-available/
• The websites/virtual host being used for current run are located at: ./sites-enabled/
2/27/2018
Gaurav Mishra <gmishx@gmail.com>
Apache configuration file
• The global configuration file is stored at /etc/apache2/apache2.conf
• Can be overridden for each directory using .htaccess
• The file contains directives, mostly distributed in directive blocks
• Commonly used directive blocks:
▫ directory
 Contains directives defined for a particular directory
▫ VirtualHost
 Directives defined for a virtual host
2/27/2018
Gaurav Mishra <gmishx@gmail.com>
List of common directives
• Alias
• Allow
• AllowOverride
• AuthBasicAuthoritative
• AuthType
• Deny
• <Directory>
• DocumentRoot
• <Else>
• ErrorLog
• ErrorLogFormat
• <If>
• <IfModule>
• Include
• KeepAlive
• Listen
• LoadModule
• Redirect
• RedirectMatch
• ServerAdmin
• ServerAlias
• ServerLimit
• ServerName
• SSLCertificateFile
• SSLCertificateKeyFile
• SSLEngine
• <VirtualHost>
2/27/2018
Gaurav Mishra <gmishx@gmail.com>
Setting up directory directive
Alias “/holidaypics” “/var/www/html/newpics”
<Directory /var/www/html/newpics>
AuthType Basic
AuthName Newpics
AuthUserFile /web/users
AuthGroupFile /web/groups
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
<Files dinner.jpg>
order deny,allow
deny from all
allow from 127.0.0.1
</Files>
</Directory>
2/27/2018
Gaurav Mishra <gmishx@gmail.com>
Setting up VirtualHost
• Virtual hosting allows the Apache web server to host multiple websites as part of its
own.
ServerName server.example.com
ServerAlias server server2.example.com server2
ServerAlias *.example.com
<VirtualHost server.example.com:80>
Alias /files /home/user/Documents/files
<Directory "/home/user/Documents/files">
AllowOverride None
Options FollowSymLinks MultiViews
</Directory>
</VirtualHost>
2/27/2018
Gaurav Mishra <gmishx@gmail.com>
Setting up SSL support
<IfModule mod_ssl.c>
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/ssl/certs/certi.cer
SSLCertificateKeyFile /etc/ssl/keys/certi.key
</VirtualHost>
</IfModule>
2/27/2018
Gaurav Mishra <gmishx@gmail.com>
Apache tools
• To enable a website configuration from /etc/apache2/sites-available/mysite.conf
▫ a2ensite mysite
• To disable a website configuration from /etc/apache2/sites-available/mysite.conf
▫ a2dissite mysite
• To enable a module from /etc/apache2/mods-available/mymod.conf
▫ a2enmod mymod
• To disable a module from /etc/apache2/mods-available/mymod.conf
▫ a2dismod mymod
• Check the syntax of apache2.conf
▫ apachectl configtest
2/27/2018
Gaurav Mishra <gmishx@gmail.com>
Cron jobs
• Cron jobs are set of actions which must be executed at a certain time on a given day.
• Cron daemon keeps checking these cron jobs and execute them whenever required.
• Each user can have their own cron jobs.
• The job set by a user run with their privileges.
• The cron jobs are stored in crontab files.
2/27/2018
Gaurav Mishra <gmishx@gmail.com>
Crontab format
• The format of a crontab field follows:
▫ minute hour day-month month day(s)-week task
• A crontab entry has six fields:
▫ The first five are used to specify the time for an action
 The first field specifies the minute (0–59)
 The second field specifies the houst (0-23)
 The third field specifies the day of the month (1–31)
 The fourth field specifies the month of the year (1–12, or month prefixes like Jan and Sep)
 And the fifth field specifies the day of the week (0–6, or day prefixes like Wed and Fri),
starting with 0 as Sunday.
▫ The last field is the action itself.
• Each field can be defined as range or using * to match all
2/27/2018
Gaurav Mishra <gmishx@gmail.com>
Crontab examples
• Take backup at 2:00 AM from Mon-Friday of every month
▫ 0 2 * * 1-5 tar cf /home/backp /home/projects
• Take backup at 2:00 AM on Sun, Wed, Fri of every month
▫ 0 2 * * 0,3,5 tar cf /home/backp /home/projects
• Take backup every other day at 2:00 AM on any day
▫ 0 2 */2 * * tar cf /home/backp /home/projects
2/27/2018
Gaurav Mishra <gmishx@gmail.com>
Adding a cron job
To add a cron job
1. First write the job in the respective 6 columns in a file.
▫ echo “0 2 * * 1-5 tar cf /home/backp /home/projects” > mybackup_script
2. Pass the file to crontab
▫ crontab mybackup_script
To edit a job already added
1. Open the crontab in edit mode
▫ crontab -e
2. Edit the job
3. Save the changes
Check all the jobs for current user
• crontab -l
2/27/2018
Gaurav Mishra <gmishx@gmail.com>
Cron file organization
2/27/2018
Gaurav Mishra <gmishx@gmail.com>
Proxy servers
• Proxy servers acts as an intermediate
between the client and the server.
• They serve many purpose.
• Caching
• Anonymizing
• Load management
• Redirection
• Every client sends a request to the
proxy, the proxy checks if it can serve
the request from it’s cache otherwise
forward it.
• Proxy sometimes helps working with
firewalls.
2/27/2018
Gaurav Mishra <gmishx@gmail.com>
Setting up proxy on host
• Majority of the software support proxy
• The most common place to find the proxy setting is in the System environment
variable http_proxy, https_proxy, ftp_proxy.
• The variables can be set using the export command a given terminal session.
• They can also be set using the /etc/profile and /etc/bash.bashrc files for sessions
globally.
• The string follows following pattern:
▫ [username]:[password]@ipaddress:port
▫ http://[username]:[password]@address.com:port
2/27/2018

More Related Content

What's hot (20)

Git lab installation guide
Git lab installation guideGit lab installation guide
Git lab installation guide
Raiful Hasan
 
Git real slides
Git real slidesGit real slides
Git real slides
Lucas Couto
 
Boulder dev ops-meetup-11-2012-rundeck
Boulder dev ops-meetup-11-2012-rundeckBoulder dev ops-meetup-11-2012-rundeck
Boulder dev ops-meetup-11-2012-rundeck
Will Sterling
 
Ansible introduction - XX Betabeers Galicia
Ansible introduction - XX Betabeers GaliciaAnsible introduction - XX Betabeers Galicia
Ansible introduction - XX Betabeers Galicia
Juan Diego Pereiro Arean
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
Behzad Altaf
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
Somkiat Puisungnoen
 
Nginx
NginxNginx
Nginx
Geeta Vinnakota
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
Senthilkumar Gopal
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
Michael Bahr
 
Apache development with GitHub and Travis CI
Apache development with GitHub and Travis CIApache development with GitHub and Travis CI
Apache development with GitHub and Travis CI
Jukka Zitting
 
under the covers -- chef in 20 minutes or less
under the covers -- chef in 20 minutes or lessunder the covers -- chef in 20 minutes or less
under the covers -- chef in 20 minutes or less
sarahnovotny
 
Dependencies and Licenses
Dependencies and LicensesDependencies and Licenses
Dependencies and Licenses
Robert Reiz
 
Apache Camel: Jetty Component With Example
Apache Camel: Jetty Component With ExampleApache Camel: Jetty Component With Example
Apache Camel: Jetty Component With Example
Amit Aggarwal
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
HubSpot
 
Chef introduction
Chef introductionChef introduction
Chef introduction
FENG Zhichao
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
kevsmith
 
Infrastructure = Code
Infrastructure = CodeInfrastructure = Code
Infrastructure = Code
Georg Sorst
 
Deep dive networking
Deep dive networkingDeep dive networking
Deep dive networking
Victor Morales
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction
Robert Reiz
 
Spot Trading - A case study in continuous delivery for mission critical finan...
Spot Trading - A case study in continuous delivery for mission critical finan...Spot Trading - A case study in continuous delivery for mission critical finan...
Spot Trading - A case study in continuous delivery for mission critical finan...
SaltStack
 
Git lab installation guide
Git lab installation guideGit lab installation guide
Git lab installation guide
Raiful Hasan
 
Boulder dev ops-meetup-11-2012-rundeck
Boulder dev ops-meetup-11-2012-rundeckBoulder dev ops-meetup-11-2012-rundeck
Boulder dev ops-meetup-11-2012-rundeck
Will Sterling
 
Ansible introduction - XX Betabeers Galicia
Ansible introduction - XX Betabeers GaliciaAnsible introduction - XX Betabeers Galicia
Ansible introduction - XX Betabeers Galicia
Juan Diego Pereiro Arean
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
Behzad Altaf
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
Michael Bahr
 
Apache development with GitHub and Travis CI
Apache development with GitHub and Travis CIApache development with GitHub and Travis CI
Apache development with GitHub and Travis CI
Jukka Zitting
 
under the covers -- chef in 20 minutes or less
under the covers -- chef in 20 minutes or lessunder the covers -- chef in 20 minutes or less
under the covers -- chef in 20 minutes or less
sarahnovotny
 
Dependencies and Licenses
Dependencies and LicensesDependencies and Licenses
Dependencies and Licenses
Robert Reiz
 
Apache Camel: Jetty Component With Example
Apache Camel: Jetty Component With ExampleApache Camel: Jetty Component With Example
Apache Camel: Jetty Component With Example
Amit Aggarwal
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
HubSpot
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
kevsmith
 
Infrastructure = Code
Infrastructure = CodeInfrastructure = Code
Infrastructure = Code
Georg Sorst
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction
Robert Reiz
 
Spot Trading - A case study in continuous delivery for mission critical finan...
Spot Trading - A case study in continuous delivery for mission critical finan...Spot Trading - A case study in continuous delivery for mission critical finan...
Spot Trading - A case study in continuous delivery for mission critical finan...
SaltStack
 

Similar to Apache, cron and proxy (20)

Configuring apache, php, my sql, ftp, ssl, ip tables phpmyadmin and server mo...
Configuring apache, php, my sql, ftp, ssl, ip tables phpmyadmin and server mo...Configuring apache, php, my sql, ftp, ssl, ip tables phpmyadmin and server mo...
Configuring apache, php, my sql, ftp, ssl, ip tables phpmyadmin and server mo...
Chanaka Lasantha
 
Deepa ppt about lamp technology
Deepa ppt about lamp technologyDeepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa
 
lamp technology
lamp technologylamp technology
lamp technology
Deepa
 
Apache web server tutorial for linux
Apache web server tutorial for linuxApache web server tutorial for linux
Apache web server tutorial for linux
Sahad Sali
 
Apache1.ppt
Apache1.pptApache1.ppt
Apache1.ppt
webhostingguy
 
Ch 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet ServersCh 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet Servers
webhostingguy
 
Apache1.ppt
Apache1.pptApache1.ppt
Apache1.ppt
webhostingguy
 
Using aphace-as-proxy-server
Using aphace-as-proxy-serverUsing aphace-as-proxy-server
Using aphace-as-proxy-server
HARRY CHAN PUTRA
 
Lamp technology
Lamp technologyLamp technology
Lamp technology
2tharan21
 
Apache
ApacheApache
Apache
Rathan Raj
 
Linux basics (part 2)
Linux basics (part 2)Linux basics (part 2)
Linux basics (part 2)
OSU Open Source Lab
 
Command line for the beginner - Using the command line in developing for the...
Command line for the beginner -  Using the command line in developing for the...Command line for the beginner -  Using the command line in developing for the...
Command line for the beginner - Using the command line in developing for the...
Jim Birch
 
Meeting 14. web server ii
Meeting 14. web server iiMeeting 14. web server ii
Meeting 14. web server ii
Syaiful Ahdan
 
Apache Street Smarts Presentation (SANS 99)
Apache Street Smarts Presentation (SANS 99)Apache Street Smarts Presentation (SANS 99)
Apache Street Smarts Presentation (SANS 99)
Michael Dobe, Ph.D.
 
Apache course contents
Apache course contentsApache course contents
Apache course contents
darshangosh
 
linux_admin_course_full_for beginers.pptx
linux_admin_course_full_for beginers.pptxlinux_admin_course_full_for beginers.pptx
linux_admin_course_full_for beginers.pptx
tejas2429
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
Muhammad Qazi
 
Dance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech TalkDance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech Talk
Michael Peacock
 
Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0
venkatakrishnan k
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
Ajaigururaj R
 
Configuring apache, php, my sql, ftp, ssl, ip tables phpmyadmin and server mo...
Configuring apache, php, my sql, ftp, ssl, ip tables phpmyadmin and server mo...Configuring apache, php, my sql, ftp, ssl, ip tables phpmyadmin and server mo...
Configuring apache, php, my sql, ftp, ssl, ip tables phpmyadmin and server mo...
Chanaka Lasantha
 
Deepa ppt about lamp technology
Deepa ppt about lamp technologyDeepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa
 
lamp technology
lamp technologylamp technology
lamp technology
Deepa
 
Apache web server tutorial for linux
Apache web server tutorial for linuxApache web server tutorial for linux
Apache web server tutorial for linux
Sahad Sali
 
Ch 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet ServersCh 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet Servers
webhostingguy
 
Using aphace-as-proxy-server
Using aphace-as-proxy-serverUsing aphace-as-proxy-server
Using aphace-as-proxy-server
HARRY CHAN PUTRA
 
Lamp technology
Lamp technologyLamp technology
Lamp technology
2tharan21
 
Command line for the beginner - Using the command line in developing for the...
Command line for the beginner -  Using the command line in developing for the...Command line for the beginner -  Using the command line in developing for the...
Command line for the beginner - Using the command line in developing for the...
Jim Birch
 
Meeting 14. web server ii
Meeting 14. web server iiMeeting 14. web server ii
Meeting 14. web server ii
Syaiful Ahdan
 
Apache Street Smarts Presentation (SANS 99)
Apache Street Smarts Presentation (SANS 99)Apache Street Smarts Presentation (SANS 99)
Apache Street Smarts Presentation (SANS 99)
Michael Dobe, Ph.D.
 
Apache course contents
Apache course contentsApache course contents
Apache course contents
darshangosh
 
linux_admin_course_full_for beginers.pptx
linux_admin_course_full_for beginers.pptxlinux_admin_course_full_for beginers.pptx
linux_admin_course_full_for beginers.pptx
tejas2429
 
Dance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech TalkDance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech Talk
Michael Peacock
 
Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0
venkatakrishnan k
 
Ad

More from Gaurav Mishra (11)

FOSSology and OSS-Tools for License Compliance and Automation
FOSSology and OSS-Tools for License Compliance and AutomationFOSSology and OSS-Tools for License Compliance and Automation
FOSSology and OSS-Tools for License Compliance and Automation
Gaurav Mishra
 
FOSSology & GSOC Journey
FOSSology & GSOC JourneyFOSSology & GSOC Journey
FOSSology & GSOC Journey
Gaurav Mishra
 
Block Chain - Merkel and Key exchange
Block Chain - Merkel and Key exchangeBlock Chain - Merkel and Key exchange
Block Chain - Merkel and Key exchange
Gaurav Mishra
 
Block Chain - Introduction
Block Chain - IntroductionBlock Chain - Introduction
Block Chain - Introduction
Gaurav Mishra
 
Backup using rsync
Backup using rsyncBackup using rsync
Backup using rsync
Gaurav Mishra
 
Disk quota and sysd procd
Disk quota and sysd procdDisk quota and sysd procd
Disk quota and sysd procd
Gaurav Mishra
 
Linux User Management
Linux User ManagementLinux User Management
Linux User Management
Gaurav Mishra
 
Linux Run Level
Linux Run LevelLinux Run Level
Linux Run Level
Gaurav Mishra
 
Firewall and IPtables
Firewall and IPtablesFirewall and IPtables
Firewall and IPtables
Gaurav Mishra
 
Linux securities
Linux securitiesLinux securities
Linux securities
Gaurav Mishra
 
wget, curl and scp
wget, curl and scpwget, curl and scp
wget, curl and scp
Gaurav Mishra
 
FOSSology and OSS-Tools for License Compliance and Automation
FOSSology and OSS-Tools for License Compliance and AutomationFOSSology and OSS-Tools for License Compliance and Automation
FOSSology and OSS-Tools for License Compliance and Automation
Gaurav Mishra
 
FOSSology & GSOC Journey
FOSSology & GSOC JourneyFOSSology & GSOC Journey
FOSSology & GSOC Journey
Gaurav Mishra
 
Block Chain - Merkel and Key exchange
Block Chain - Merkel and Key exchangeBlock Chain - Merkel and Key exchange
Block Chain - Merkel and Key exchange
Gaurav Mishra
 
Block Chain - Introduction
Block Chain - IntroductionBlock Chain - Introduction
Block Chain - Introduction
Gaurav Mishra
 
Disk quota and sysd procd
Disk quota and sysd procdDisk quota and sysd procd
Disk quota and sysd procd
Gaurav Mishra
 
Linux User Management
Linux User ManagementLinux User Management
Linux User Management
Gaurav Mishra
 
Firewall and IPtables
Firewall and IPtablesFirewall and IPtables
Firewall and IPtables
Gaurav Mishra
 
Ad

Recently uploaded (20)

Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
Domino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use CasesDomino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use Cases
panagenda
 
Introduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUEIntroduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUE
Google Developer Group On Campus European Universities in Egypt
 
Co-Constructing Explanations for AI Systems using Provenance
Co-Constructing Explanations for AI Systems using ProvenanceCo-Constructing Explanations for AI Systems using Provenance
Co-Constructing Explanations for AI Systems using Provenance
Paul Groth
 
Data Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any ApplicationData Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any Application
Safe Software
 
MCP vs A2A vs ACP: Choosing the Right Protocol | Bluebash
MCP vs A2A vs ACP: Choosing the Right Protocol | BluebashMCP vs A2A vs ACP: Choosing the Right Protocol | Bluebash
MCP vs A2A vs ACP: Choosing the Right Protocol | Bluebash
Bluebash
 
LSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection FunctionLSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection Function
Takahiro Harada
 
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Safe Software
 
What is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to Know
What is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to KnowWhat is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to Know
What is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to Know
SMACT Works
 
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
Jasper Oosterveld
 
Securiport - A Border Security Company
Securiport  -  A Border Security CompanySecuriport  -  A Border Security Company
Securiport - A Border Security Company
Securiport
 
Improving Developer Productivity With DORA, SPACE, and DevEx
Improving Developer Productivity With DORA, SPACE, and DevExImproving Developer Productivity With DORA, SPACE, and DevEx
Improving Developer Productivity With DORA, SPACE, and DevEx
Justin Reock
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean accountYour startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
TimeSeries Machine Learning - PyData London 2025
TimeSeries Machine Learning - PyData London 2025TimeSeries Machine Learning - PyData London 2025
TimeSeries Machine Learning - PyData London 2025
Suyash Joshi
 
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
Edge AI and Vision Alliance
 
If You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FMEIf You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FME
Safe Software
 
AI Creative Generates You Passive Income Like Never Before
AI Creative Generates You Passive Income Like Never BeforeAI Creative Generates You Passive Income Like Never Before
AI Creative Generates You Passive Income Like Never Before
SivaRajan47
 
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdfHow Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
Rejig Digital
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptxISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
AyilurRamnath1
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
Domino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use CasesDomino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use Cases
panagenda
 
Co-Constructing Explanations for AI Systems using Provenance
Co-Constructing Explanations for AI Systems using ProvenanceCo-Constructing Explanations for AI Systems using Provenance
Co-Constructing Explanations for AI Systems using Provenance
Paul Groth
 
Data Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any ApplicationData Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any Application
Safe Software
 
MCP vs A2A vs ACP: Choosing the Right Protocol | Bluebash
MCP vs A2A vs ACP: Choosing the Right Protocol | BluebashMCP vs A2A vs ACP: Choosing the Right Protocol | Bluebash
MCP vs A2A vs ACP: Choosing the Right Protocol | Bluebash
Bluebash
 
LSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection FunctionLSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection Function
Takahiro Harada
 
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Safe Software
 
What is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to Know
What is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to KnowWhat is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to Know
What is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to Know
SMACT Works
 
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
Jasper Oosterveld
 
Securiport - A Border Security Company
Securiport  -  A Border Security CompanySecuriport  -  A Border Security Company
Securiport - A Border Security Company
Securiport
 
Improving Developer Productivity With DORA, SPACE, and DevEx
Improving Developer Productivity With DORA, SPACE, and DevExImproving Developer Productivity With DORA, SPACE, and DevEx
Improving Developer Productivity With DORA, SPACE, and DevEx
Justin Reock
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean accountYour startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
TimeSeries Machine Learning - PyData London 2025
TimeSeries Machine Learning - PyData London 2025TimeSeries Machine Learning - PyData London 2025
TimeSeries Machine Learning - PyData London 2025
Suyash Joshi
 
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
Edge AI and Vision Alliance
 
If You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FMEIf You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FME
Safe Software
 
AI Creative Generates You Passive Income Like Never Before
AI Creative Generates You Passive Income Like Never BeforeAI Creative Generates You Passive Income Like Never Before
AI Creative Generates You Passive Income Like Never Before
SivaRajan47
 
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdfHow Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
Rejig Digital
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptxISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
AyilurRamnath1
 

Apache, cron and proxy

  • 1. Gaurav Mishra <[email protected]> Linux - 5 Apache Configuration file, Cron jobs, Proxy server 2/27/2018 Unrestricted
  • 2. Gaurav Mishra <[email protected]> Apache http server • One of the most commonly used open source sever • Can be easily tuned • Works in harmony with PHP • Provides various security measures • Installs as httpd in many Linux distros • Packages as apache2 in Debian based distributions 2/27/2018
  • 3. Gaurav Mishra <[email protected]> Apache directory structure • The apache foundation have their hierarchical structure for the respective configuration files. • The root is located at: /etc/apache2/ • The main configuration file is located at ./apache2.conf • The modules currently installed are located at: ./mods-available/ • The modules currently in use are located at: ./mods-enabled/ • The websites/virtual host available for current install are located at: ./sites-available/ • The websites/virtual host being used for current run are located at: ./sites-enabled/ 2/27/2018
  • 4. Gaurav Mishra <[email protected]> Apache configuration file • The global configuration file is stored at /etc/apache2/apache2.conf • Can be overridden for each directory using .htaccess • The file contains directives, mostly distributed in directive blocks • Commonly used directive blocks: ▫ directory  Contains directives defined for a particular directory ▫ VirtualHost  Directives defined for a virtual host 2/27/2018
  • 5. Gaurav Mishra <[email protected]> List of common directives • Alias • Allow • AllowOverride • AuthBasicAuthoritative • AuthType • Deny • <Directory> • DocumentRoot • <Else> • ErrorLog • ErrorLogFormat • <If> • <IfModule> • Include • KeepAlive • Listen • LoadModule • Redirect • RedirectMatch • ServerAdmin • ServerAlias • ServerLimit • ServerName • SSLCertificateFile • SSLCertificateKeyFile • SSLEngine • <VirtualHost> 2/27/2018
  • 6. Gaurav Mishra <[email protected]> Setting up directory directive Alias “/holidaypics” “/var/www/html/newpics” <Directory /var/www/html/newpics> AuthType Basic AuthName Newpics AuthUserFile /web/users AuthGroupFile /web/groups <IfModule mod_dir.c> DirectoryIndex index.php </IfModule> <Files dinner.jpg> order deny,allow deny from all allow from 127.0.0.1 </Files> </Directory> 2/27/2018
  • 7. Gaurav Mishra <[email protected]> Setting up VirtualHost • Virtual hosting allows the Apache web server to host multiple websites as part of its own. ServerName server.example.com ServerAlias server server2.example.com server2 ServerAlias *.example.com <VirtualHost server.example.com:80> Alias /files /home/user/Documents/files <Directory "/home/user/Documents/files"> AllowOverride None Options FollowSymLinks MultiViews </Directory> </VirtualHost> 2/27/2018
  • 8. Gaurav Mishra <[email protected]> Setting up SSL support <IfModule mod_ssl.c> <VirtualHost *:443> SSLEngine on SSLCertificateFile /etc/ssl/certs/certi.cer SSLCertificateKeyFile /etc/ssl/keys/certi.key </VirtualHost> </IfModule> 2/27/2018
  • 9. Gaurav Mishra <[email protected]> Apache tools • To enable a website configuration from /etc/apache2/sites-available/mysite.conf ▫ a2ensite mysite • To disable a website configuration from /etc/apache2/sites-available/mysite.conf ▫ a2dissite mysite • To enable a module from /etc/apache2/mods-available/mymod.conf ▫ a2enmod mymod • To disable a module from /etc/apache2/mods-available/mymod.conf ▫ a2dismod mymod • Check the syntax of apache2.conf ▫ apachectl configtest 2/27/2018
  • 10. Gaurav Mishra <[email protected]> Cron jobs • Cron jobs are set of actions which must be executed at a certain time on a given day. • Cron daemon keeps checking these cron jobs and execute them whenever required. • Each user can have their own cron jobs. • The job set by a user run with their privileges. • The cron jobs are stored in crontab files. 2/27/2018
  • 11. Gaurav Mishra <[email protected]> Crontab format • The format of a crontab field follows: ▫ minute hour day-month month day(s)-week task • A crontab entry has six fields: ▫ The first five are used to specify the time for an action  The first field specifies the minute (0–59)  The second field specifies the houst (0-23)  The third field specifies the day of the month (1–31)  The fourth field specifies the month of the year (1–12, or month prefixes like Jan and Sep)  And the fifth field specifies the day of the week (0–6, or day prefixes like Wed and Fri), starting with 0 as Sunday. ▫ The last field is the action itself. • Each field can be defined as range or using * to match all 2/27/2018
  • 12. Gaurav Mishra <[email protected]> Crontab examples • Take backup at 2:00 AM from Mon-Friday of every month ▫ 0 2 * * 1-5 tar cf /home/backp /home/projects • Take backup at 2:00 AM on Sun, Wed, Fri of every month ▫ 0 2 * * 0,3,5 tar cf /home/backp /home/projects • Take backup every other day at 2:00 AM on any day ▫ 0 2 */2 * * tar cf /home/backp /home/projects 2/27/2018
  • 13. Gaurav Mishra <[email protected]> Adding a cron job To add a cron job 1. First write the job in the respective 6 columns in a file. ▫ echo “0 2 * * 1-5 tar cf /home/backp /home/projects” > mybackup_script 2. Pass the file to crontab ▫ crontab mybackup_script To edit a job already added 1. Open the crontab in edit mode ▫ crontab -e 2. Edit the job 3. Save the changes Check all the jobs for current user • crontab -l 2/27/2018
  • 14. Gaurav Mishra <[email protected]> Cron file organization 2/27/2018
  • 15. Gaurav Mishra <[email protected]> Proxy servers • Proxy servers acts as an intermediate between the client and the server. • They serve many purpose. • Caching • Anonymizing • Load management • Redirection • Every client sends a request to the proxy, the proxy checks if it can serve the request from it’s cache otherwise forward it. • Proxy sometimes helps working with firewalls. 2/27/2018
  • 16. Gaurav Mishra <[email protected]> Setting up proxy on host • Majority of the software support proxy • The most common place to find the proxy setting is in the System environment variable http_proxy, https_proxy, ftp_proxy. • The variables can be set using the export command a given terminal session. • They can also be set using the /etc/profile and /etc/bash.bashrc files for sessions globally. • The string follows following pattern: ▫ [username]:[password]@ipaddress:port ▫ http://[username]:[password]@address.com:port 2/27/2018