SlideShare une entreprise Scribd logo
1  sur  71
Télécharger pour lire hors ligne
•
•
• http://panweizeng.com
•   http://meituan.com
•           http://meituan.com


•   hosts
•               http://meituan.com


•   hosts
•   localhost   127.0.0.1
• /etc/nsswitch.conf
• /etc/hosts
• /etc/resolv.conf
Mail Client

 Web Browser
cache 1-30mins


Clients Programs


                   Your Computer
Mail Client

 Web Browser       hosts
cache 1-30mins


Clients Programs


                           Your Computer
Mail Client

 Web Browser       hosts   DNS Resolver
cache 1-30mins
                           local cache


Clients Programs


                           Your Computer
Mail Client

 Web Browser       hosts   DNS Resolver
cache 1-30mins
                           local cache


Clients Programs


                           Your Computer
Your Computer
Local Name Server / Your ISP




       1




       Your Computer
Local Name Server / Your ISP       Root Name Server
                               2




       1




       Your Computer
Local Name Server / Your ISP       Root Name Server
                               2




       1




       Your Computer
Local Name Server / Your ISP           Root Name Server
                               2




                                   3

                                                 Com Name Server




       1




       Your Computer
Local Name Server / Your ISP           Root Name Server
                               2




                                   3

                                                 Com Name Server




       1




       Your Computer
Local Name Server / Your ISP                          Root Name Server
                                   2




                                            3

                                                                Com Name Server

                               4


                                       Meituan Name Server
       1




       Your Computer
Local Name Server / Your ISP                          Root Name Server
                                   2




                                            3

                                                                Com Name Server

                               4


                                       Meituan Name Server
       1




       Your Computer
Local Name Server / Your ISP                          Root Name Server
                                   2




                                            3

                                                                Com Name Server

                               4


                                       Meituan Name Server
       1            5




       Your Computer
Local Name Server / Your ISP                          Root Name Server
                                   2




                                            3

                                                                Com Name Server

                               4


                                       Meituan Name Server
       1            5




                                        6



       Your Computer                                           Meituan Web Server
• meituan.com
• www.meituan.com
• dig meituan.com
• dig +trace meituan.com
• dig www.meituan.com
• dig s0.meituan.com
HTTP
• Hypertext Transfer Protocol
HTTP
• Hypertext Transfer Protocol
•            HTTP
HTTP
• Hypertext Transfer Protocol
•            HTTP
client   server
request


client             server
request


client              server



         response
• GET /path/to/file/index.html HTTP/1.0
• HTTP/1.0 200 OK
• 404 Not Found
• 500 Server Error
• 301 Moved Permanently
• 302 Moved Temporarily
• 304 Not Modified
• 401 Unauthorized
• 403 Forbidden
• 502 Bad Gateway
Request Headers
• Host: www.meituan.com
• User-Agent:Mozilla/5.0 (Macintosh; Intel
  Mac OS X 10.6; rv:2.0.1) Gecko/20100101
  Firefox/4.0.1
AJAX


• X-Requested-With: XMLHttpRequest
Response Headers
• Server: nginx
• Date: Mon, 20 Jun 2011 09:12:11 GMT
• Content-Type: application/json;
  charset=utf-8;
• Content-Length: 138
•
• cookie
• session
•
Apache


• HTTP Server
• sudo /etc/init.d/httpd start
• sudo /etc/init.d/httpd stop
• sudo /etc/init.d/httpd restart/graceful
Mac


• sudo apachectl start
• /etc/httpd/conf/http.conf
• /etc/http/conf/vm/*
• ServerRoot "/etc/httpd"
• DocumentRoot "/opt/www/webroot"
• Listen 80
• User apache
• Group apache
• LoadModule php5_module     /usr/lib64/
  httpd/modules/libphp5.so
• DirectoryIndex index.php index.html
• AccessFileName .htaccess
• ErrorLog /opt/logs/error_log
• ErrorDocument 404 /not-found.html
<Directory />
  Options FollowSymLinks Indexes
  AllowOverride None
</Directory>
<VirtualHost *:80>
  ServerName www.xpmt.com
  ServerAlias *.xpmt.com
  DocumentRoot /home/panweizeng/mt/webroot
  RewriteEngine on
  RewriteRule ^/(static/.*)$ /$1 [L]
  RewriteRule ^/(.*)$ /index.php [L]
</VirtualHost>
<VirtualHost *:80>
  ServerName xpmt.com
  RewriteEngine On
  RewriteRule ^/(.*)$ http://www.xpmt.com/$1 [L,R]
</VirtualHost>
Nginx


• HTTP server
• load balancer
apache
nginx


ngnix
ngnix
                  nginx




apache   apache    ...    apache   apache
•
PHP Framework


•
•
where to start


• apache config
• webroot/index.php
index.php

if ($redirectTo = checkSource()) {
    header("Location: $redirectTo");
    die;
}
ControllerFront::getInstance()->dispatch();
•             ControllerFront::importConf

•         router config
    URL
dispatch

•         URL

•
•   Request

•   ControllerAction::runAction
runAction

•   Action

•   Plugin

•
• classes/*
• Core.php
• Obj.php
• DBObj.php
• DB.php
• Cookie.php
• Session.php
• Cache.php
• Debug.php
• Log.php
• Loader.php
• Request.php
• Response.php
• ControllerFront.php
• ControllerAction.php
• ControllerActionPlugin.php
• ControllerBusiness.php
•         prepend.php(php -i |grep prepend)
    /opt/www.config/prepend.php
•              prepend.php
    ~/mt/config/prepend.php
•
    config/*
prepend.php

•         ROOT/TS/DOMAIN_HOST

•   include_path

•
•     Debug

•   autoload
autoload


• Loader::registerAutoload
    Loader::load
•            class/Model/Controller/Helper
• http://bj.meituan.com/deal/959830.html
• http://bj.meituan.com/deals/page2
•            Macbook         apache+php
    +mysql

•       mini web framework    php/python/
    ruby                       router
    dispatcher orm

•

Contenu connexe

Tendances

Ibm tivoli access manager for e business tracing http connections redp4622
Ibm tivoli access manager for e business tracing http connections redp4622Ibm tivoli access manager for e business tracing http connections redp4622
Ibm tivoli access manager for e business tracing http connections redp4622
Banking at Ho Chi Minh city
 
Tola.leng mail server (sq_mail &amp; rcmail)_q5_
Tola.leng mail server (sq_mail &amp; rcmail)_q5_Tola.leng mail server (sq_mail &amp; rcmail)_q5_
Tola.leng mail server (sq_mail &amp; rcmail)_q5_
Tola LENG
 
Basic security &amp; info
Basic security &amp; infoBasic security &amp; info
Basic security &amp; info
Tola LENG
 

Tendances (20)

retrieving the mail
retrieving the mailretrieving the mail
retrieving the mail
 
Microsoft Exchange 2013 architecture
Microsoft Exchange 2013 architectureMicrosoft Exchange 2013 architecture
Microsoft Exchange 2013 architecture
 
Postfix
PostfixPostfix
Postfix
 
Configure DHCP Server and DHCP-Relay
Configure DHCP Server and DHCP-RelayConfigure DHCP Server and DHCP-Relay
Configure DHCP Server and DHCP-Relay
 
Ftp configuration in cisco packet tracer
Ftp configuration in cisco packet tracerFtp configuration in cisco packet tracer
Ftp configuration in cisco packet tracer
 
US07FFT-mod_ftp.ppt
US07FFT-mod_ftp.pptUS07FFT-mod_ftp.ppt
US07FFT-mod_ftp.ppt
 
Ibm tivoli access manager for e business tracing http connections redp4622
Ibm tivoli access manager for e business tracing http connections redp4622Ibm tivoli access manager for e business tracing http connections redp4622
Ibm tivoli access manager for e business tracing http connections redp4622
 
Constructing a Modern Information System for a Small Company: A Real Battle
Constructing a Modern Information System for a Small Company: A Real BattleConstructing a Modern Information System for a Small Company: A Real Battle
Constructing a Modern Information System for a Small Company: A Real Battle
 
Web Server Technologies I: HTTP & Getting Started
Web Server Technologies I: HTTP & Getting StartedWeb Server Technologies I: HTTP & Getting Started
Web Server Technologies I: HTTP & Getting Started
 
Server configuration
Server configurationServer configuration
Server configuration
 
Basic config in Cisco router
Basic config in Cisco routerBasic config in Cisco router
Basic config in Cisco router
 
Ftp server configuration on cisco packet tracer
Ftp server configuration on cisco packet tracerFtp server configuration on cisco packet tracer
Ftp server configuration on cisco packet tracer
 
Linux corporate-training-in-mumbai
Linux corporate-training-in-mumbaiLinux corporate-training-in-mumbai
Linux corporate-training-in-mumbai
 
Tola.leng mail server (sq_mail &amp; rcmail)_q5_
Tola.leng mail server (sq_mail &amp; rcmail)_q5_Tola.leng mail server (sq_mail &amp; rcmail)_q5_
Tola.leng mail server (sq_mail &amp; rcmail)_q5_
 
File server on using cisco packet tracer
File server on using cisco packet tracerFile server on using cisco packet tracer
File server on using cisco packet tracer
 
Basic security &amp; info
Basic security &amp; infoBasic security &amp; info
Basic security &amp; info
 
HTTP/2 standard for video streaming
HTTP/2 standard for video streamingHTTP/2 standard for video streaming
HTTP/2 standard for video streaming
 
Protocol
ProtocolProtocol
Protocol
 
Dns server converted
Dns server convertedDns server converted
Dns server converted
 
File Sever
File SeverFile Sever
File Sever
 

Similaire à 后端基础知识

PowerPoint Presentation
PowerPoint PresentationPowerPoint Presentation
PowerPoint Presentation
webhostingguy
 
Domain name system advanced power point presentation
Domain name system advanced power point presentationDomain name system advanced power point presentation
Domain name system advanced power point presentation
rituchouhan1508
 
Presentation 1
Presentation 1Presentation 1
Presentation 1
aisadhsa
 
Installing sametime851-from-zero-to-hero-the next generation
Installing sametime851-from-zero-to-hero-the next generationInstalling sametime851-from-zero-to-hero-the next generation
Installing sametime851-from-zero-to-hero-the next generation
a8us
 

Similaire à 后端基础知识 (20)

PowerPoint Presentation
PowerPoint PresentationPowerPoint Presentation
PowerPoint Presentation
 
Domain name system advanced power point presentation
Domain name system advanced power point presentationDomain name system advanced power point presentation
Domain name system advanced power point presentation
 
Breadcrumbs to Loaves: BSides Austin '17
Breadcrumbs to Loaves: BSides Austin '17Breadcrumbs to Loaves: BSides Austin '17
Breadcrumbs to Loaves: BSides Austin '17
 
Adm02. IBM Connections Adminblast
Adm02. IBM Connections AdminblastAdm02. IBM Connections Adminblast
Adm02. IBM Connections Adminblast
 
Applciation footprinting, discovery and enumeration
Applciation footprinting, discovery and enumerationApplciation footprinting, discovery and enumeration
Applciation footprinting, discovery and enumeration
 
Presentation building the ibm®lotus®domino®8.5 infrastructure
Presentation   building the ibm®lotus®domino®8.5 infrastructurePresentation   building the ibm®lotus®domino®8.5 infrastructure
Presentation building the ibm®lotus®domino®8.5 infrastructure
 
Web server
Web serverWeb server
Web server
 
SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...
SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...
SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...
 
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...
 
Wed hosting
Wed hostingWed hosting
Wed hosting
 
Building an ActionScript Game Server with over 15,000 Concurrent Connections
Building an ActionScript Game Server with over 15,000 Concurrent ConnectionsBuilding an ActionScript Game Server with over 15,000 Concurrent Connections
Building an ActionScript Game Server with over 15,000 Concurrent Connections
 
A Hitchhiker's Guide to troubleshooting IBM Connections
A Hitchhiker's Guide to troubleshooting IBM ConnectionsA Hitchhiker's Guide to troubleshooting IBM Connections
A Hitchhiker's Guide to troubleshooting IBM Connections
 
A hitchhiker’s guide to troubleshooting ibm connections
A hitchhiker’s guide to troubleshooting ibm connectionsA hitchhiker’s guide to troubleshooting ibm connections
A hitchhiker’s guide to troubleshooting ibm connections
 
Using MAMP for Web Development
Using MAMP for Web DevelopmentUsing MAMP for Web Development
Using MAMP for Web Development
 
Presentation 1
Presentation 1Presentation 1
Presentation 1
 
Installing sametime851-from-zero-to-hero-the next generation
Installing sametime851-from-zero-to-hero-the next generationInstalling sametime851-from-zero-to-hero-the next generation
Installing sametime851-from-zero-to-hero-the next generation
 
XMPP/Jingle(VoIP)/Perl Ocean 2012/03
XMPP/Jingle(VoIP)/Perl Ocean 2012/03XMPP/Jingle(VoIP)/Perl Ocean 2012/03
XMPP/Jingle(VoIP)/Perl Ocean 2012/03
 
Debugging IBM Connections for the Impatient Admin - Social Connections VII
Debugging IBM Connections for the Impatient Admin - Social Connections VIIDebugging IBM Connections for the Impatient Admin - Social Connections VII
Debugging IBM Connections for the Impatient Admin - Social Connections VII
 
Samba distributed env
Samba distributed envSamba distributed env
Samba distributed env
 
Secure360 - Attack All the Layers! Again!
Secure360 - Attack All the Layers! Again!Secure360 - Attack All the Layers! Again!
Secure360 - Attack All the Layers! Again!
 

Dernier

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Dernier (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

后端基础知识