├── Support ├── nibs │ └── RequestSecureStringKeychain.nib │ │ ├── classes.nib │ │ ├── keyedobjects.nib │ │ └── info.nib ├── lib │ ├── tail_log.applescript │ ├── keychain.rb │ ├── apache_mate.rb │ └── apache_ctl.rb ├── bin │ └── apache_doc.rb └── data │ └── apache_doc_dictionary.xml ├── Snippets ├── Directory.tmSnippet ├── AllowOverride (allow).tmSnippet ├── Options (opt).tmSnippet └── VirtualHost (vhost).plist ├── Preferences ├── Symbols: Virtual Host.plist ├── Symbols: Directory.tmPreferences ├── Symbols: Location.tmPreferences ├── Comments.tmPreferences ├── Symbols: VHost Location.tmPreferences ├── Symbols: VHost Directory.tmPreferences ├── Default Tag Inside Virtual Host.tmPreferences ├── Folding.tmPreferences ├── Miscellaneous.plist ├── Completions: Modules Identifiers.tmPreferences ├── Completions: Modules.tmPreferences └── Completions.plist ├── Commands ├── Restart.plist ├── apachectl stop.plist ├── apachectl start.plist ├── Graceful.plist ├── Documentation for Word:Selection.tmCommand ├── Tail error log.plist ├── Tail access.log.plist ├── Open Include.tmCommand ├── apachectl configtest.plist ├── Open users.conf.plist └── Help.tmCommand ├── README.mdown ├── Syntaxes ├── mod_perl.tmLanguage └── Apache.plist └── info.plist /Support/nibs/RequestSecureStringKeychain.nib/classes.nib: -------------------------------------------------------------------------------- 1 | {IBClasses = (); IBVersion = 1; } -------------------------------------------------------------------------------- /Support/nibs/RequestSecureStringKeychain.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/apache.tmbundle/master/Support/nibs/RequestSecureStringKeychain.nib/keyedobjects.nib -------------------------------------------------------------------------------- /Snippets/Directory.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | <Directory ${1:/Library/WebServer/${2:example/}}> 7 | $0 8 | </Directory> 9 | 10 | name 11 | Directory 12 | scope 13 | source.apache-config 14 | tabTrigger 15 | dir 16 | uuid 17 | 894AF995-B54F-43CC-8810-2A0CCD56B168 18 | 19 | 20 | -------------------------------------------------------------------------------- /Snippets/AllowOverride (allow).tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | AllowOverride ${1:${2:AuthConfig }${3:FileInfo }${4:Indexes }${5:Limit }${6:Options}} 7 | name 8 | Allow Override 9 | scope 10 | source.apache-config 11 | tabTrigger 12 | allow 13 | uuid 14 | C6256A3A-BC6E-4587-8D3C-6588AD5F89F5 15 | 16 | 17 | -------------------------------------------------------------------------------- /Preferences/Symbols: Virtual Host.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Symbol List: Virtual Host 7 | scope 8 | meta.toc-list.virtual-host.apache-config 9 | settings 10 | 11 | showInSymbolList 12 | 1 13 | symbolTransformation 14 | s/^\s*/Host: /; s/\s+/ /g 15 | 16 | uuid 17 | 2722AC57-58BC-4B78-9DA7-889D007D6EE7 18 | 19 | 20 | -------------------------------------------------------------------------------- /Preferences/Symbols: Directory.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Symbol List: Directory 7 | scope 8 | meta.toc-list.directory.apache-config 9 | settings 10 | 11 | showInSymbolList 12 | 1 13 | symbolTransformation 14 | s/^\s*/Dir: /; s/\s+/ /g; s/['"]//g 15 | 16 | uuid 17 | D7BA06D8-6C48-4F0D-B8D7-64E80289EC78 18 | 19 | 20 | -------------------------------------------------------------------------------- /Preferences/Symbols: Location.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Symbol List: Location 7 | scope 8 | meta.toc-list.location.apache-config 9 | settings 10 | 11 | showInSymbolList 12 | 1 13 | symbolTransformation 14 | s/^\s*/Loc: /; s/\s+/ /g; s/['"]//g 15 | 16 | uuid 17 | 028FCB49-F488-4B14-9E40-B96BE6DABB33 18 | 19 | 20 | -------------------------------------------------------------------------------- /Snippets/Options (opt).tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | Options ${1:${2:All }${3:ExecCGI }${4:FollowSymLinks }${5:Includes }${6:IncludesNOEXEC }${7:Indexes }${8:MultiViews }${9:SymLinksIfOwnerMatch}} 7 | name 8 | Options 9 | scope 10 | source.apache-config 11 | tabTrigger 12 | opt 13 | uuid 14 | 230ED58C-E1B9-4BA6-A034-6F5629B6F46C 15 | 16 | 17 | -------------------------------------------------------------------------------- /Support/nibs/RequestSecureStringKeychain.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBDocumentLocation 6 | 267 762 356 240 0 0 1280 1002 7 | IBFramework Version 8 | 446.1 9 | IBOldestOS 10 | 5 11 | IBOpenObjects 12 | 13 | 3 14 | 15 | IBSystem Version 16 | 8S165 17 | targetFramework 18 | IBCocoaFramework 19 | 20 | 21 | -------------------------------------------------------------------------------- /Preferences/Comments.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Comments 7 | scope 8 | source.apache-config 9 | settings 10 | 11 | shellVariables 12 | 13 | 14 | name 15 | TM_COMMENT_START 16 | value 17 | # 18 | 19 | 20 | 21 | uuid 22 | A65C8C91-5513-4A4A-94C2-DE914861BF1C 23 | 24 | 25 | -------------------------------------------------------------------------------- /Preferences/Symbols: VHost Location.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Symbol List: VHost Location 7 | scope 8 | meta.vhost.apache-config meta.toc-list.location.apache-config 9 | settings 10 | 11 | showInSymbolList 12 | 1 13 | symbolTransformation 14 | s/^\s*//; s/\s+/ /g; s/['"]//g; s/^/ Loc: / 15 | 16 | uuid 17 | 368BB45D-F7FE-4F22-A07E-9B57304CCCE4 18 | 19 | 20 | -------------------------------------------------------------------------------- /Preferences/Symbols: VHost Directory.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Symbol List: VHost Directory 7 | scope 8 | meta.vhost.apache-config meta.toc-list.directory.apache-config 9 | settings 10 | 11 | showInSymbolList 12 | 1 13 | symbolTransformation 14 | s/^\s*//; s/\s+/ /g; s/['"]//g; s/^/ Dir: / 15 | 16 | uuid 17 | 520EFC4B-5F39-44B0-8BBF-30FE832E4BD9 18 | 19 | 20 | -------------------------------------------------------------------------------- /Snippets/VirtualHost (vhost).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | <VirtualHost ${1:example.org}> 7 | ServerAdmin webmaster@$1 8 | DocumentRoot /www/vhosts/$1 9 | ServerName $1 10 | ErrorLog logs/$1-error_log 11 | CustomLog logs/$1-access_log common 12 | </VirtualHost> 13 | name 14 | Virtual Host 15 | scope 16 | source.apache-config 17 | tabTrigger 18 | vhost 19 | uuid 20 | 12F1DA22-C375-4DF5-B0C5-87BA2AA38AB0 21 | 22 | 23 | -------------------------------------------------------------------------------- /Preferences/Default Tag Inside Virtual Host.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Default Tag Inside Virtual Host 7 | scope 8 | meta.vhost.apache-config 9 | settings 10 | 11 | shellVariables 12 | 13 | 14 | name 15 | TM_DEFAULT_TAG 16 | value 17 | Directory 18 | 19 | 20 | 21 | uuid 22 | 3B71D5D6-E87D-4D12-B9D9-4D615C7A3072 23 | 24 | 25 | -------------------------------------------------------------------------------- /Support/lib/tail_log.applescript: -------------------------------------------------------------------------------- 1 | --#!/usr/bin/osascript 2 | -- The line above is Leopard only 3 | 4 | on run argv 5 | 6 | set LogPath to item 1 of argv 7 | set WindowTitle to item 2 of argv 8 | 9 | tell application "Terminal" 10 | activate 11 | with timeout of 1800 seconds 12 | do script with command "tail -f " & LogPath 13 | tell window 1 14 | set title displays shell path to false 15 | set title displays window size to false 16 | set title displays device name to true 17 | set title displays file name to true 18 | set title displays custom title to true 19 | set custom title to WindowTitle 20 | set number of columns to 80 21 | set number of rows to 20 22 | end tell 23 | end timeout 24 | end tell 25 | 26 | end run 27 | -------------------------------------------------------------------------------- /Support/lib/keychain.rb: -------------------------------------------------------------------------------- 1 | # Simple interface for reading and writing generic passwords to 2 | # the KeyChain. 3 | module KeyChain 4 | class << self 5 | 6 | # Adds a generic password to the users keychain using the specified 7 | # Account, Service and Password paramaters. 8 | # Example: security add-generic-password -a "TextMate Bundles" -s "Apache.tmbundle" -p "test-password" 9 | def add_generic_password(account, service, pass) 10 | %x{security add-generic-password -a "#{account}" -s "#{service}" -p "#{pass}"} 11 | end 12 | 13 | # Locates a generic password from the users keychain. 14 | def find_generic_password(account, service) 15 | result = %x{security find-generic-password -g -a "#{account}" -s "#{service}" 2>&1 >/dev/null} 16 | result =~ /^password: "(.*)"$/ ? $1 : nil 17 | end 18 | 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /Preferences/Folding.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Folding 7 | scope 8 | source.apache-config 9 | settings 10 | 11 | foldingStartMarker 12 | ^[ ]*(?x) 13 | (<(?i:FilesMatch|Files|DirectoryMatch|Directory|LocationMatch|Location|VirtualHost|IfModule|IfDefine|Perl)\b.*?> 14 | ) 15 | foldingStopMarker 16 | ^[ ]*(?x) 17 | (</(?i:FilesMatch|Files|DirectoryMatch|Directory|LocationMatch|Location|VirtualHost|IfModule|IfDefine|Perl)> 18 | ) 19 | 20 | uuid 21 | 594576A7-E8BD-4D9C-8BBF-4A34ED74F83F 22 | 23 | 24 | -------------------------------------------------------------------------------- /Commands/Restart.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby18 -rjcode -Ku 9 | 10 | require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/apache_ctl.rb" 11 | 12 | ApacheCTL.new.restart 13 | input 14 | none 15 | keyEquivalent 16 | @r 17 | name 18 | Restart 19 | output 20 | discard 21 | requiredCommands 22 | 23 | 24 | command 25 | apachectl 26 | locations 27 | 28 | /opt/local/bin/apachectl 29 | /usr/local/bin/apachectl 30 | 31 | variable 32 | TM_APACHECTL 33 | 34 | 35 | scope 36 | source.apache-config 37 | uuid 38 | 33CB105E-A303-49CC-8F69-9F832D6CD8F4 39 | 40 | 41 | -------------------------------------------------------------------------------- /Commands/apachectl stop.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby18 -rjcode -Ku 9 | 10 | require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/apache_ctl.rb" 11 | 12 | ApacheCTL.new.stop 13 | input 14 | none 15 | keyEquivalent 16 | @r 17 | name 18 | Stop 19 | output 20 | discard 21 | requiredCommands 22 | 23 | 24 | command 25 | apachectl 26 | locations 27 | 28 | /opt/local/bin/apachectl 29 | /usr/local/bin/apachectl 30 | 31 | variable 32 | TM_APACHECTL 33 | 34 | 35 | scope 36 | source.apache-config 37 | uuid 38 | F86D90AC-AF81-48A7-9E04-BA4AA95668B1 39 | 40 | 41 | -------------------------------------------------------------------------------- /Commands/apachectl start.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby18 -rjcode -Ku 9 | 10 | require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/apache_ctl.rb" 11 | 12 | ApacheCTL.new.start 13 | input 14 | none 15 | keyEquivalent 16 | @r 17 | name 18 | Start 19 | output 20 | discard 21 | requiredCommands 22 | 23 | 24 | command 25 | apachectl 26 | locations 27 | 28 | /opt/local/bin/apachectl 29 | /usr/local/bin/apachectl 30 | 31 | variable 32 | TM_APACHECTL 33 | 34 | 35 | scope 36 | source.apache-config 37 | uuid 38 | CB5FA82C-1287-4312-9407-E695AF16D966 39 | 40 | 41 | -------------------------------------------------------------------------------- /README.mdown: -------------------------------------------------------------------------------- 1 | # Installation 2 | 3 | You can install this bundle in TextMate by opening the preferences and going to the bundles tab. After installation it will be automatically updated for you. 4 | 5 | # General 6 | 7 | * [Bundle Styleguide](http://kb.textmate.org/bundle_styleguide) — _before you make changes_ 8 | * [Commit Styleguide](http://kb.textmate.org/commit_styleguide) — _before you send a pull request_ 9 | * [Writing Bug Reports](http://kb.textmate.org/writing_bug_reports) — _before you report an issue_ 10 | 11 | # License 12 | 13 | If not otherwise specified (see below), files in this repository fall under the following license: 14 | 15 | Permission to copy, use, modify, sell and distribute this 16 | software is granted. This software is provided "as is" without 17 | express or implied warranty, and with no claim as to its 18 | suitability for any purpose. 19 | 20 | An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. -------------------------------------------------------------------------------- /Commands/Graceful.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby18 -rjcode -Ku 9 | 10 | require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/apache_ctl.rb" 11 | 12 | ApacheCTL.new.graceful 13 | input 14 | none 15 | keyEquivalent 16 | @r 17 | name 18 | Graceful Restart 19 | output 20 | discard 21 | requiredCommands 22 | 23 | 24 | command 25 | apachectl 26 | locations 27 | 28 | /opt/local/bin/apachectl 29 | /usr/local/bin/apachectl 30 | 31 | variable 32 | TM_APACHECTL 33 | 34 | 35 | scope 36 | source.apache-config 37 | uuid 38 | A33BD582-D5BB-4C5B-A14C-5E47A90B01E3 39 | 40 | 41 | -------------------------------------------------------------------------------- /Commands/Documentation for Word:Selection.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env bash 9 | [[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh" 10 | 11 | apache_doc.rb 12 | fallbackInput 13 | word 14 | input 15 | selection 16 | inputFormat 17 | text 18 | keyEquivalent 19 | ^h 20 | name 21 | Documentation for Word / Selection 22 | outputCaret 23 | afterOutput 24 | outputFormat 25 | html 26 | outputLocation 27 | newWindow 28 | scope 29 | source.apache-config 30 | semanticClass 31 | lookup.define.apache-config 32 | uuid 33 | A7A95E10-D9F9-4519-9538-2C95C8CB0298 34 | version 35 | 2 36 | 37 | 38 | -------------------------------------------------------------------------------- /Commands/Tail error log.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | TIGER_ERROR_LOG="/var/log/httpd/error_log" 9 | LEOPARD_ERROR_LOG="/var/log/apache2/error_log" 10 | 11 | if [[ "$TM_APACHE_ERROR_LOG" == "" ]]; then 12 | 13 | if [[ -f "$LEOPARD_ERROR_LOG" ]]; then 14 | 15 | TM_APACHE_ERROR_LOG="$LEOPARD_ERROR_LOG" 16 | 17 | else 18 | 19 | TM_APACHE_ERROR_LOG="$TIGER_ERROR_LOG" 20 | 21 | fi 22 | fi 23 | 24 | if [[ -f "$TM_APACHE_ERROR_LOG" ]]; then 25 | 26 | #tailLog "$TM_APACHE_ERROR_LOG" "httpd Error Log" 27 | osascript "$TM_BUNDLE_SUPPORT/lib/tail_log.applescript" "$TM_APACHE_ERROR_LOG" "httpd Error Log" >/dev/null; 28 | 29 | else 30 | 31 | exit_show_tool_tip "http Access Log not located." 32 | 33 | fi 34 | 35 | input 36 | none 37 | name 38 | Tail Error Log 39 | output 40 | discard 41 | scope 42 | source.apache-config 43 | uuid 44 | 9460A02A-EC2A-4A03-9F99-21201D7B7988 45 | 46 | 47 | -------------------------------------------------------------------------------- /Commands/Tail access.log.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | TIGER_ACCESS_LOG="/var/log/httpd/access_log" 9 | LEOPARD_ACCESS_LOG="/var/log/apache2/access_log" 10 | 11 | if [[ "$TM_APACHE_ACCESS_LOG" == "" ]]; then 12 | 13 | if [[ -f "$LEOPARD_ACCESS_LOG" ]]; then 14 | 15 | TM_APACHE_ACCESS_LOG="$LEOPARD_ACCESS_LOG" 16 | 17 | else 18 | 19 | TM_APACHE_ACCESS_LOG="$TIGER_ACCESS_LOG" 20 | 21 | fi 22 | fi 23 | 24 | if [[ -f "$TM_APACHE_ACCESS_LOG" ]]; then 25 | 26 | #tailLog "$TM_APACHE_ACCESS_LOG" "httpd Access Log" 27 | osascript "$TM_BUNDLE_SUPPORT/lib/tail_log.applescript" "$TM_APACHE_ACCESS_LOG" "httpd Access Log" >/dev/null; 28 | 29 | else 30 | 31 | exit_show_tool_tip "http Access Log not located." 32 | 33 | fi 34 | input 35 | none 36 | name 37 | Tail Access Log 38 | output 39 | discard 40 | scope 41 | source.apache-config 42 | uuid 43 | A7AB0414-104A-4128-B16E-72094A1DD5EB 44 | 45 | 46 | -------------------------------------------------------------------------------- /Commands/Open Include.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby18 9 | 10 | require ENV['TM_SUPPORT_PATH'] + '/lib/exit_codes' 11 | require ENV['TM_BUNDLE_SUPPORT'] + '/lib/apache_mate' 12 | 13 | include = STDIN.read.strip 14 | 15 | TextMate.exit_show_tool_tip( "Include line not recognised." ) if include.empty? 16 | 17 | include_path = include.sub( "Include ", "" ).sub( "*.conf", "" ) 18 | 19 | unless include_path =~ /^\// 20 | include_path = find_server_root + "/" + include_path 21 | end 22 | 23 | if File.exist?(include_path) 24 | `open -a TextMate "#{include_path}"` 25 | else 26 | TextMate.exit_show_tool_tip( "Include file could not be located." ) 27 | end 28 | 29 | fallbackInput 30 | line 31 | input 32 | selection 33 | keyEquivalent 34 | @D 35 | name 36 | Open Include 37 | output 38 | discard 39 | scope 40 | source.include.apache-config 41 | uuid 42 | 19821FE1-709A-4B9D-B51C-68DBF8C2A93F 43 | 44 | 45 | -------------------------------------------------------------------------------- /Support/lib/apache_mate.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby18 -wKU 2 | 3 | require "rexml/document" 4 | 5 | #Locates the ServerRoot path. 6 | def find_server_root 7 | conf = File.open( ENV['TM_FILEPATH'], "r" ) 8 | conf.each do |line| 9 | if line =~ /^ServerRoot/ 10 | return line.sub( "ServerRoot \"", "").sub("\"\n","") 11 | end 12 | end 13 | return "" 14 | end 15 | 16 | # Generates a completion list based on the prescribed document. 17 | # 18 | # TODO: Automatically locate modules and directives 19 | # /Library/WebServer/share/httpd/manual/mod/directives.html 20 | # TODO: Update the xPath definition to use the directives.html. 21 | # 22 | # Example useage: generate_definition_completions( "directive_list.xml" ) 23 | # 24 | def generate_definition_completions( directive_list ) 25 | 26 | completions = "{ completions = ( " 27 | 28 | directive_doc = REXML::Document.new File.new(directive_list) 29 | 30 | directive_doc.elements.each( "ul/li/a" ) do |tag| 31 | completion = tag[0].to_s.sub("<","").sub(">",""); 32 | completions += "'" + completion + "'," 33 | end 34 | 35 | completions = completions.chop + " ); }" 36 | print completions 37 | 38 | end 39 | 40 | # TODO: generate_module_completions 41 | # /Library/WebServer/share/httpd/manual/mod/index.html 42 | #def generateModuleCompletions( module_list ) 43 | #end 44 | -------------------------------------------------------------------------------- /Commands/apachectl configtest.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env bash 9 | [[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh" 10 | 11 | ${TM_APACHECTL:-apachectl} configtest 12 | input 13 | none 14 | inputFormat 15 | text 16 | keyEquivalent 17 | @r 18 | name 19 | Config Test 20 | outputCaret 21 | afterOutput 22 | outputFormat 23 | text 24 | outputLocation 25 | toolTip 26 | requiredCommands 27 | 28 | 29 | command 30 | apachectl 31 | locations 32 | 33 | /opt/local/bin/apachectl 34 | /usr/local/bin/apachectl 35 | 36 | variable 37 | TM_APACHECTL 38 | 39 | 40 | scope 41 | source.apache-config 42 | uuid 43 | 46DBB57A-D7F8-4049-9BE8-4ACABFF5F056 44 | version 45 | 2 46 | 47 | 48 | -------------------------------------------------------------------------------- /Preferences/Miscellaneous.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Miscellaneous 7 | scope 8 | source.apache-config 9 | settings 10 | 11 | highlightPairs 12 | 13 | 14 | ( 15 | ) 16 | 17 | 18 | { 19 | } 20 | 21 | 22 | [ 23 | ] 24 | 25 | 26 | 27 | 28 | 29 | 30 | /<\w+[^>]*>/ 31 | /</\w+>/ 32 | 33 | 34 | shellVariables 35 | 36 | 37 | name 38 | TM_DEFAULT_TAG 39 | value 40 | VirtualHost 41 | 42 | 43 | smartTypingPairs 44 | 45 | 46 | " 47 | " 48 | 49 | 50 | ( 51 | ) 52 | 53 | 54 | { 55 | } 56 | 57 | 58 | [ 59 | ] 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | ' 71 | ' 72 | 73 | 74 | ` 75 | ` 76 | 77 | 78 | < 79 | > 80 | 81 | 82 | 83 | uuid 84 | 3FFEAB5C-E41D-466A-B253-98952059DC3B 85 | 86 | 87 | -------------------------------------------------------------------------------- /Commands/Open users.conf.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby18 -wKU 9 | 10 | SUPPORT = ENV['TM_SUPPORT_PATH'] 11 | 12 | require SUPPORT + '/lib/escape' 13 | require SUPPORT + '/lib/exit_codes' 14 | require SUPPORT + '/lib/osx/plist' 15 | 16 | def find_apache 17 | return [ ENV['TM_APACHE_DIRECTORY'].to_s, 18 | "/etc/apache2", 19 | "/private/etc/httpd" ].find { |path| File.directory? path } 20 | end 21 | 22 | #Search the path for any filename ending with .conf 23 | def search_for_conf path 24 | confs = [] 25 | search_path = find_apache.to_s + path 26 | Dir.open( search_path ).each do |file| 27 | if file.to_s =~ /\.conf$/ 28 | menu_item = { 'title' => File.basename(file), 'path' => search_path + "/" + file.to_s } 29 | confs.push(menu_item) 30 | end 31 | end if File.exists?( search_path ) 32 | confs.push( { 'separator' => 1 } ) if !confs.empty? 33 | return confs 34 | end 35 | 36 | conf_files = search_for_conf( "" ) + 37 | search_for_conf( "/users" ) + 38 | search_for_conf( "/extra" ) + 39 | search_for_conf( "/other" ) + 40 | search_for_conf( "/conf" ) 41 | 42 | conf_files.pop() 43 | 44 | TextMate.exit_show_tool_tip( "No .conf files found ") if conf_files.empty? 45 | 46 | plist = { 'menuItems' => conf_files }.to_plist 47 | res = OSX::PropertyList::load(`"$DIALOG" -up #{e_sh plist}`) 48 | 49 | TextMate.exit_discard() unless res.has_key? 'selectedMenuItem' 50 | 51 | `open -a TextMate #{res['selectedMenuItem']['path']}` 52 | 53 | input 54 | none 55 | inputFormat 56 | text 57 | keyEquivalent 58 | @C 59 | name 60 | Open Config… 61 | outputCaret 62 | afterOutput 63 | outputFormat 64 | text 65 | outputLocation 66 | discard 67 | scope 68 | source.apache-config 69 | uuid 70 | 0BB34044-0A2C-4D11-A2DE-30107D622ECF 71 | version 72 | 2 73 | 74 | 75 | -------------------------------------------------------------------------------- /Commands/Help.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | . "$TM_SUPPORT_PATH/lib/webpreview.sh" 9 | html_header "Apache HTTP Server Bundle Help" "Apache" 10 | 11 | "$TM_SUPPORT_PATH/lib/markdown_to_help.rb" <<'EOF' 12 | # Installation 13 | 14 | The Apache HTTP Server is installed by default on OS X and can be enabled here "Sytem Preferences &#x2192; Sharing &#x2192; Web Sharing". 15 | 16 | If you would like to install it manually then the most recent version of Apache can be downloaded [here](http://httpd.apache.org/download.cgi). 17 | 18 | # Configuration Options 19 | 20 | These environment variables allow you to define or customise the behavior of certain commands. For help on setting them please see [TextMate help](?environment_variables). 21 | 22 | * `$TM_APACHE_DIRECTORY` 23 | 24 | If you have installed your own version of Apache you can set this variable to allow TextMate to use it rather than the default. 25 | For example if you installed it via MacPorts then set it to `/opt/local/apache2`. 26 | 27 | * `TM_APACHE_ACCESS_LOG` 28 | 29 | The path to the access log to open when running the _Tail Access Log_ command. This is optional and will use apache's default when not defined. 30 | 31 | * `TM_APACHE_ERROR_LOG` 32 | 33 | The path to the error log to open when running the _Tail Error Log_ command. This is optional and will use apache's default when not defined. 34 | 35 | 36 | * `TM_APACHE_MANUAL_URI` 37 | 38 | Currently for Leopard users only. If you have installed your own version of Apache HTTP Server, you can set this variable to the location of its manual. It is recommended that this is accessible via the server itself, using a http prefix ie `http://localhost/manual`. If you use a file path ie `/Library/WebServer/share/httpd/manual` the documenation command will open the inital documentation page but any hyperlinks within will fail. If the manual directory is not located the _Documentation for Word/Selection_ command will fall back to the [httpd.apache.org](http://httpd.apache.org/docs/2.2) website using the documentation for Apache 2.2. 39 | 40 | EOF 41 | 42 | html_footer 43 | input 44 | none 45 | name 46 | Help 47 | output 48 | showAsHTML 49 | scope 50 | source.apache-config 51 | uuid 52 | 5B7DE766-BAA9-44B1-B9AD-6BE331E29A03 53 | 54 | 55 | -------------------------------------------------------------------------------- /Preferences/Completions: Modules Identifiers.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Completions: Module Identifiers 7 | scope 8 | source.apache-config 9 | settings 10 | 11 | completions 12 | 13 | authn_file_module 14 | authn_dbm_module 15 | authn_anon_module 16 | authn_dbd_module 17 | authn_default_module 18 | authz_host_module 19 | authz_groupfile_module 20 | authz_user_module 21 | authz_dbm_module 22 | authz_owner_module 23 | authz_default_module 24 | auth_basic_module 25 | auth_digest_module 26 | cache_module 27 | disk_cache_module 28 | mem_cache_module 29 | dbd_module 30 | dumpio_module 31 | ext_filter_module 32 | include_module 33 | filter_module 34 | deflate_module 35 | log_config_module 36 | log_forensic_module 37 | logio_module 38 | env_module 39 | mime_magic_module 40 | cern_meta_module 41 | expires_module 42 | headers_module 43 | ident_module 44 | usertrack_module 45 | unique_id_module 46 | setenvif_module 47 | version_module 48 | proxy_module 49 | proxy_connect_module 50 | proxy_ftp_module 51 | proxy_http_module 52 | proxy_ajp_module 53 | proxy_balancer_module 54 | ssl_module 55 | mime_module 56 | dav_module 57 | status_module 58 | autoindex_module 59 | asis_module 60 | info_module 61 | cgi_module 62 | dav_fs_module 63 | vhost_alias_module 64 | negotiation_module 65 | dir_module 66 | imagemap_module 67 | actions_module 68 | speling_module 69 | userdir_module 70 | alias_module 71 | rewrite_module 72 | bonjour_module 73 | php5_module 74 | fastcgi_module 75 | 76 | 77 | uuid 78 | CC27CF7F-2E60-455B-9C95-B4CFAD52F28B 79 | 80 | 81 | -------------------------------------------------------------------------------- /Preferences/Completions: Modules.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Completions: Modules 7 | scope 8 | source.apache-config 9 | settings 10 | 11 | completions 12 | 13 | access_module 14 | actions_module 15 | action_module 16 | alias_module 17 | anon_auth_module 18 | asis_module 19 | authn_anon_module 20 | authn_dbd_module 21 | authn_dbm_module 22 | authn_default_module 23 | authn_file_module 24 | authz_dbm_module 25 | authz_default_module 26 | authz_groupfile_module 27 | authz_host_module 28 | authz_owner_module 29 | authz_user_module 30 | auth_basic_module 31 | auth_digest_module 32 | auth_module 33 | autoindex_module 34 | bonjour_module 35 | cache_module 36 | cern_meta_module 37 | cgi_module 38 | config_log_module 39 | dav_fs_module 40 | dav_module 41 | dbd_module 42 | dbm_auth_module 43 | deflate_module 44 | digest_module 45 | dir_module 46 | disk_cache_module 47 | dumpio_module 48 | env_module 49 | expires_module 50 | ext_filter_module 51 | filter_module 52 | foo_module 53 | headers_module 54 | hfs_apple_module 55 | ident_module 56 | imagemap_module 57 | imap_module 58 | includes_module 59 | include_module 60 | info_module 61 | jk_module 62 | logio_module 63 | log_config_module 64 | log_forensic_module 65 | mem_cache_module 66 | mime_magic_module 67 | mime_module 68 | negotiation_module 69 | perl_module 70 | php4_module 71 | php5_module 72 | proxy_ajp_module 73 | proxy_balancer_module 74 | proxy_connect_module 75 | proxy_ftp_module 76 | proxy_http_module 77 | proxy_module 78 | rendezvous_apple_module 79 | rendezvous_module 80 | rewrite_module 81 | setenvif_module 82 | speling_module 83 | ssl_module 84 | status_module 85 | unique_id_module 86 | userdir_module 87 | usertrack_module 88 | version_module 89 | vhost_alias_module 90 | 91 | 92 | uuid 93 | 6AB0D8D7-1536-407B-BF47-15204E4622CE 94 | 95 | 96 | -------------------------------------------------------------------------------- /Syntaxes/mod_perl.tmLanguage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | fileTypes 6 | 7 | keyEquivalent 8 | ^~A 9 | name 10 | mod_perl 11 | patterns 12 | 13 | 14 | begin 15 | ^= 16 | captures 17 | 18 | 0 19 | 20 | name 21 | punctuation.definition.comment.mod_perl 22 | 23 | 24 | end 25 | ^=cut 26 | name 27 | comment.block.documentation.apache-config.mod_perl 28 | 29 | 30 | match 31 | \b(PerlAddVar|PerlConfigRequire|PerlLoadModule|PerlModule|PerlOptions|PerlPassEnv|PerlPostConfigRequire|PerlRequire|PerlSetEnv|PerlSetVar|PerlSwitches|SetHandler|PerlOpenLogsHandler|PerlPostConfigHandler|PerlChildInitHandler|PerlChildExitHandler|PerlPreConnectionHandler|PerlProcessConnectionHandler|PerlInputFilterHandler|PerlOutputFilterHandler|PerlSetInputFilter|PerlSetOutputFilter|PerlPostReadRequestHandler|PerlTransHandler|PerlMapToStorageHandler|PerlInitHandler|PerlHeaderParserHandler|PerlAccessHandler|PerlAuthenHandler|PerlAuthzHandler|PerlTypeHandler|PerlFixupHandler|PerlResponseHandler|PerlLogHandler|PerlCleanupHandler|PerlInterpStart|PerlInterpMax|PerlInterpMinSpare|PerlInterpMaxSpare|PerlInterpMaxRequests|PerlInterpScope|PerlTrace)\b 32 | name 33 | support.constant.apache-config.mod_perl 34 | 35 | 36 | match 37 | \b(PerlHandler|PerlScript|PerlSendHeader|PerlSetupEnv|PerlTaintCheck|PerlWarn|PerlFreshRestart)\b 38 | name 39 | support.constant.apache-config.mod_perl_1.mod_perl 40 | 41 | 42 | begin 43 | ^\s*((<)(Perl)(>)) 44 | beginCaptures 45 | 46 | 1 47 | 48 | name 49 | meta.tag.apache-config 50 | 51 | 2 52 | 53 | name 54 | punctuation.definition.tag.apache-config 55 | 56 | 3 57 | 58 | name 59 | entity.name.tag.apache-config 60 | 61 | 4 62 | 63 | name 64 | punctuation.definition.tag.apache-config 65 | 66 | 67 | end 68 | ^\s*((</)(Perl)(>)) 69 | endCaptures 70 | 71 | 1 72 | 73 | name 74 | meta.tag.apache-config 75 | 76 | 2 77 | 78 | name 79 | punctuation.definition.tag.apache-config 80 | 81 | 3 82 | 83 | name 84 | entity.name.tag.apache-config 85 | 86 | 4 87 | 88 | name 89 | punctuation.definition.tag.apache-config 90 | 91 | 92 | name 93 | meta.perl-section.apache-config.mod_perl 94 | patterns 95 | 96 | 97 | include 98 | source.perl 99 | 100 | 101 | 102 | 103 | include 104 | source.apache-config 105 | 106 | 107 | scopeName 108 | source.apache-config.mod_perl 109 | uuid 110 | 6A616B03-1053-49BF-830F-0F4E63DB2447 111 | 112 | 113 | -------------------------------------------------------------------------------- /info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | contactEmailRot13 6 | fvzba@uryirpgbe.bet 7 | contactName 8 | Simon Gregory 9 | deleted 10 | 11 | 63BE6D35-8529-4218-866B-F61C1A877C1B 12 | 151706D2-A274-4036-8CC0-837B838BAED5 13 | FC47B2D5-8116-11D9-B33A-00039398C572 14 | 15 | description 16 | Commands to relaunch <a href="http://apache.org/">Apache</a>, edit the <tt>httpd.conf</tt> file etc. 17 | mainMenu 18 | 19 | items 20 | 21 | 0BB34044-0A2C-4D11-A2DE-30107D622ECF 22 | 19821FE1-709A-4B9D-B51C-68DBF8C2A93F 23 | ------------------------------------ 24 | 964B1BC8-A3C8-443F-B9C9-716A74410E15 25 | ------------------------------------ 26 | A7A95E10-D9F9-4519-9538-2C95C8CB0298 27 | 5B7DE766-BAA9-44B1-B9AD-6BE331E29A03 28 | ------------------------------------ 29 | A7AB0414-104A-4128-B16E-72094A1DD5EB 30 | 9460A02A-EC2A-4A03-9F99-21201D7B7988 31 | ------------------------------------ 32 | C6256A3A-BC6E-4587-8D3C-6588AD5F89F5 33 | 894AF995-B54F-43CC-8810-2A0CCD56B168 34 | 230ED58C-E1B9-4BA6-A034-6F5629B6F46C 35 | 12F1DA22-C375-4DF5-B0C5-87BA2AA38AB0 36 | 37 | submenus 38 | 39 | 964B1BC8-A3C8-443F-B9C9-716A74410E15 40 | 41 | items 42 | 43 | CB5FA82C-1287-4312-9407-E695AF16D966 44 | F86D90AC-AF81-48A7-9E04-BA4AA95668B1 45 | A33BD582-D5BB-4C5B-A14C-5E47A90B01E3 46 | 33CB105E-A303-49CC-8F69-9F832D6CD8F4 47 | ------------------------------------ 48 | 46DBB57A-D7F8-4049-9BE8-4ACABFF5F056 49 | 50 | name 51 | apachectl 52 | 53 | 54 | 55 | name 56 | Apache 57 | ordering 58 | 59 | 46DBB57A-D7F8-4049-9BE8-4ACABFF5F056 60 | A33BD582-D5BB-4C5B-A14C-5E47A90B01E3 61 | 33CB105E-A303-49CC-8F69-9F832D6CD8F4 62 | CB5FA82C-1287-4312-9407-E695AF16D966 63 | F86D90AC-AF81-48A7-9E04-BA4AA95668B1 64 | A7A95E10-D9F9-4519-9538-2C95C8CB0298 65 | 0BB34044-0A2C-4D11-A2DE-30107D622ECF 66 | 19821FE1-709A-4B9D-B51C-68DBF8C2A93F 67 | 5B7DE766-BAA9-44B1-B9AD-6BE331E29A03 68 | 023D670E-80F1-11D9-9BD1-00039398C572 69 | 6A616B03-1053-49BF-830F-0F4E63DB2447 70 | 3A110F9B-69C1-4FEA-8B5A-B6CA9ED8F25B 71 | 6AB0D8D7-1536-407B-BF47-15204E4622CE 72 | CC27CF7F-2E60-455B-9C95-B4CFAD52F28B 73 | 3B71D5D6-E87D-4D12-B9D9-4D615C7A3072 74 | A65C8C91-5513-4A4A-94C2-DE914861BF1C 75 | 3FFEAB5C-E41D-466A-B253-98952059DC3B 76 | 2722AC57-58BC-4B78-9DA7-889D007D6EE7 77 | D7BA06D8-6C48-4F0D-B8D7-64E80289EC78 78 | 028FCB49-F488-4B14-9E40-B96BE6DABB33 79 | 520EFC4B-5F39-44B0-8BBF-30FE832E4BD9 80 | 368BB45D-F7FE-4F22-A07E-9B57304CCCE4 81 | A7AB0414-104A-4128-B16E-72094A1DD5EB 82 | 9460A02A-EC2A-4A03-9F99-21201D7B7988 83 | C6256A3A-BC6E-4587-8D3C-6588AD5F89F5 84 | 230ED58C-E1B9-4BA6-A034-6F5629B6F46C 85 | 12F1DA22-C375-4DF5-B0C5-87BA2AA38AB0 86 | 87 | uuid 88 | D4FB34BC-80F3-11D9-9D53-00039398C572 89 | 90 | 91 | -------------------------------------------------------------------------------- /Support/bin/apache_doc.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby18 2 | # encoding: utf-8 3 | 4 | SUPPORT = ENV['TM_SUPPORT_PATH'] 5 | 6 | require "rexml/document" 7 | require 'net/http' 8 | require SUPPORT + '/lib/exit_codes' 9 | require SUPPORT + "/lib/web_preview" 10 | 11 | APACHE_HELP_DICT = ENV['TM_BUNDLE_SUPPORT'] + '/data/apache_doc_dictionary.xml' 12 | 13 | # Work out what uri to use for the manual 14 | 15 | # If the user has specified the path use it, 16 | # otherwise fall back on the default apple 17 | # install location, then onto the apache website. 18 | 19 | user_manual = ENV['TM_APACHE_MANUAL_URI'] 20 | file_manual = "/Library/WebServer/share/httpd/manual" 21 | localhost_manual = "http://localhost/manual/" 22 | apache_web_manual = "http://httpd.apache.org/docs/2.2" 23 | 24 | apache_manual_uri = if !user_manual then localhost_manual else user_manual end 25 | 26 | #First check the http connection and location appear valid. 27 | if apache_manual_uri =~ /^http:\/\// 28 | 29 | begin 30 | 31 | #Can we reach our server. 32 | httpd_running = Net::HTTP.get_response(URI.parse( apache_manual_uri )) 33 | 34 | apache_manual_uri = case httpd_running 35 | when Net::HTTPSuccess : apache_manual_uri 36 | when Net::HTTPRedirection : apache_manual_uri 37 | else file_manual 38 | end 39 | 40 | rescue 41 | 42 | #If we can't get to the server then fall back to file:// 43 | #TODO: If the user has specifed the uri and it fails warn them 44 | apache_manual_uri = file_manual 45 | 46 | end 47 | 48 | end 49 | 50 | if File.directory? apache_manual_uri 51 | 52 | apache_manual_uri = "file://" + apache_manual_uri 53 | 54 | elsif apache_manual_uri !~ /^http:\/\// 55 | 56 | apache_manual_uri = apache_web_manual 57 | 58 | end 59 | 60 | #Strip trailing slashes. 61 | apache_manual_uri = apache_manual_uri.gsub( /\/$/, '' ) 62 | apache_manual_lang = "en" #Only ja.euc-jp and .ko.euc-kr seem to be viable alternatives. 63 | 64 | WORD = STDIN.read.strip 65 | 66 | #Temp detection of OS and if it's < Leopard, stick with the old system. 67 | #Commented out because I don't have Tiger to test against. 68 | # system_version = `defaults read /System/Library/CoreServices/SystemVersion ProductVersion` 69 | # unless system_version =~ /10.5.*/ 70 | # print "" 71 | # end 72 | 73 | if WORD.empty? 74 | 75 | puts html_head( :title => "Error", :sub_title => "Apache Documentation" ) 76 | puts "

Please specify a search term.

" 77 | puts "

Apache Manual

" 78 | html_footer 79 | TextMate.exit_show_html 80 | 81 | end 82 | 83 | puts html_head( :title => "Apache Documentation Search", :sub_title => "Apache HTTP Server" ) 84 | puts "

Results for ‘#{WORD}’

" 85 | 86 | # Open the APACHE_HELP_DICT xml file and 87 | # collect matching results. 88 | 89 | search_results = []; 90 | apache_doc = REXML::Document.new File.new(APACHE_HELP_DICT) 91 | apache_doc.elements.each( "dict/a" ) do |tag| 92 | 93 | e = tag[0].to_s 94 | if e[/#{WORD}/i] 95 | href = tag.attributes["href"] 96 | tag.attributes["href"] = apache_manual_uri + "/" + href.sub( ".html", ".html." + apache_manual_lang); 97 | tag.attributes["title"] = href.split(/\/|\#/).join( " > " ).sub( ".html", ""); 98 | search_results.push( tag ) 99 | end 100 | 101 | end 102 | 103 | if search_results.size == 1 104 | 105 | puts "" 106 | puts "

" 107 | 108 | elsif search_results.size > 0 109 | 110 | puts "

" 113 | 114 | else 115 | 116 | puts "

" 117 | 118 | end 119 | 120 | puts "Apache: Manual," 121 | puts "Website
" 122 | 123 | html_footer 124 | 125 | TextMate.exit_show_html 126 | -------------------------------------------------------------------------------- /Support/lib/apache_ctl.rb: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | 3 | require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/keychain" 4 | require "#{ENV['TM_SUPPORT_PATH']}/lib/escape" 5 | require "#{ENV['TM_SUPPORT_PATH']}/lib/osx/plist" 6 | require "#{ENV['TM_SUPPORT_PATH']}/lib/exit_codes" 7 | require "#{ENV['TM_SUPPORT_PATH']}/lib/web_preview" 8 | 9 | BUNDLE_SUPPORT = ENV['TM_BUNDLE_SUPPORT'] 10 | 11 | TM_DIALOG = e_sh ENV['DIALOG'] unless defined?(TM_DIALOG) 12 | TM_APACHECTL = e_sh(ENV['TM_APACHECTL'] || 'apachectl') 13 | 14 | # Ruby Proxy for the Apache HTTP Server Control Interface 15 | # Additionally manages password requests the the user. 16 | # 17 | # Author:: Simon Gregory 18 | class ApacheCTL 19 | 20 | KEYCHAIN_ACCOUNT = "TextMate Bundle" 21 | KEYCHAIN_SERVICE = "Apache.tmbundle" 22 | SUDO_FAIL_MESSAGE = /Sorry, try again\.\n/ 23 | 24 | private 25 | 26 | def initialize 27 | at_exit { finalize() } 28 | end 29 | 30 | # If the user password was gathered during this process, and 31 | # was successfully used, save it for the next command request. 32 | def finalize 33 | finally_save_password() if @save_password_on_success 34 | end 35 | 36 | # Saves the password to the users KeyChain 37 | def finally_save_password 38 | KeyChain.add_generic_password( KEYCHAIN_ACCOUNT, KEYCHAIN_SERVICE, self.password ) 39 | end 40 | 41 | # Attempts to locate the admin password from the users keychain. 42 | # When the password is not located a Dialog is generated requesting 43 | # the user input the password. 44 | # 45 | # Additionally checks to see if the user wants to store the password 46 | # in the keychain for future use. 47 | def fetch_password_from_keychain 48 | if @password == nil 49 | @password = KeyChain.find_generic_password(KEYCHAIN_ACCOUNT, KEYCHAIN_SERVICE) 50 | if @password == nil 51 | 52 | return_hash = request_apache_password() 53 | #return string is in hash->result->returnArgument. 54 | #If cancel button was clicked, hash->result is nil. 55 | @password = return_hash['result'] 56 | @password = @password['returnArgument'] if not @password.nil? 57 | 58 | TextMate.exit_discard if @password == nil 59 | @save_password_on_success = true if not return_hash['toggleValue'].nil? 60 | 61 | else 62 | @keychain_password = true 63 | end 64 | end 65 | end 66 | 67 | # Launches the Dialog request for the user password. 68 | def request_apache_password 69 | 70 | params = Hash.new 71 | params[ "button1" ] = "OK" 72 | params[ "button2" ] = "Cancel" 73 | params[ "title" ] = "Apache Admin Password" 74 | params[ "prompt" ] = "Enter password:" 75 | params[ "string" ] = "" 76 | params[ "toggleValue" ] = "0" 77 | params[ "toggleTitle" ] = "Add to Keychain" 78 | 79 | return_plist = %x{#{TM_DIALOG} -cmp #{e_sh params.to_plist} #{e_sh(BUNDLE_SUPPORT+"/nibs/RequestSecureStringKeychain.nib")}} 80 | return_hash = OSX::PropertyList::load(return_plist) 81 | 82 | end 83 | 84 | # Handles all proxy calls to apachectl. 85 | # When sudo fails 86 | def ctl_proxy(cmd, msg='Ok') 87 | 88 | result = `echo "#{self.password}" | sudo -S #{TM_APACHECTL} #{cmd} 2>&1; sudo -k`.sub("Password:\n","") 89 | result = msg if result.empty? 90 | 91 | if result =~ SUDO_FAIL_MESSAGE 92 | @save_password_on_success = false; 93 | if @keychain_password == true 94 | puts html_head( :window_title => "Apache Bundle", 95 | :page_title => "Keychain Password Error.", 96 | :sub_title => "* #{cmd} *" ); 97 | puts '

Your stored keychain password failed.

' 98 | print '

Please use the Kechain Access application to edit or delete your' 99 | print ' Apache.tmbundle keychain item then run this command again.

' 100 | TextMate.exit_show_html() 101 | end 102 | result = "Password failed." 103 | end 104 | 105 | TextMate.exit_show_tool_tip(result) 106 | 107 | end 108 | 109 | public 110 | 111 | # Getters/Setters 112 | 113 | # Get the users password. 114 | # A dialog is used to request the password when it is not 115 | # found in the users keychain. 116 | def password 117 | fetch_password_from_keychain() unless @password 118 | @password 119 | end 120 | 121 | # Commands 122 | 123 | # Gracefully restarts httpd via apachectl. 124 | def graceful 125 | ctl_proxy('graceful','httpd gracefully restarted') 126 | end 127 | 128 | # Force restart httpd via apachectl. 129 | def restart 130 | ctl_proxy('restart','httpd restarted') 131 | end 132 | 133 | # Start httpd via apachectl. 134 | def start 135 | ctl_proxy('start','httpd started') 136 | end 137 | 138 | # Stop httpd via apachectl. 139 | def stop 140 | ctl_proxy('stop','httpd stopped') 141 | end 142 | 143 | end -------------------------------------------------------------------------------- /Preferences/Completions.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Completions: Directives 7 | scope 8 | source.apache-config 9 | settings 10 | 11 | completions 12 | 13 | AcceptFilter 14 | AcceptMutex 15 | AcceptPathInfo 16 | AccessFileName 17 | Action 18 | AddAlt 19 | AddAltByEncoding 20 | AddAltByType 21 | AddCharset 22 | AddDefaultCharset 23 | AddDescription 24 | AddEncoding 25 | AddHandler 26 | AddIcon 27 | AddIconByEncoding 28 | AddIconByType 29 | AddInputFilter 30 | AddLanguage 31 | AddModuleInfo 32 | AddOutputFilter 33 | AddOutputFilterByType 34 | AddType 35 | Alias 36 | AliasMatch 37 | Allow 38 | AllowCONNECT 39 | AllowEncodedSlashes 40 | AllowOverride 41 | Anonymous 42 | Anonymous_LogEmail 43 | Anonymous_MustGiveEmail 44 | Anonymous_NoUserID 45 | Anonymous_VerifyEmail 46 | AuthBasicAuthoritative 47 | AuthBasicProvider 48 | AuthDBDUserPWQuery 49 | AuthDBDUserRealmQuery 50 | AuthDBMGroupFile 51 | AuthDBMType 52 | AuthDBMUserFile 53 | AuthDefaultAuthoritative 54 | AuthDigestAlgorithm 55 | AuthDigestDomain 56 | AuthDigestNcCheck 57 | AuthDigestNonceFormat 58 | AuthDigestNonceLifetime 59 | AuthDigestProvider 60 | AuthDigestQop 61 | AuthDigestShmemSize 62 | AuthGroupFile 63 | AuthLDAPBindDN 64 | AuthLDAPBindPassword 65 | AuthLDAPCharsetConfig 66 | AuthLDAPCompareDNOnServer 67 | AuthLDAPDereferenceAliases 68 | AuthLDAPGroupAttribute 69 | AuthLDAPGroupAttributeIsDN 70 | AuthLDAPRemoteUserAttribute 71 | AuthLDAPRemoteUserIsDN 72 | AuthLDAPUrl 73 | AuthName 74 | AuthnProviderAlias 75 | AuthType 76 | AuthUserFile 77 | AuthzDBMAuthoritative 78 | AuthzDBMType 79 | AuthzDefaultAuthoritative 80 | AuthzGroupFileAuthoritative 81 | AuthzLDAPAuthoritative 82 | AuthzOwnerAuthoritative 83 | AuthzUserAuthoritative 84 | BalancerMember 85 | BrowserMatch 86 | BrowserMatchNoCase 87 | BufferedLogs 88 | CacheDefaultExpire 89 | CacheDirLength 90 | CacheDirLevels 91 | CacheDisable 92 | CacheEnable 93 | CacheFile 94 | CacheIgnoreCacheControl 95 | CacheIgnoreHeaders 96 | CacheIgnoreNoLastMod 97 | CacheIgnoreQueryString 98 | CacheLastModifiedFactor 99 | CacheMaxExpire 100 | CacheMaxFileSize 101 | CacheMinFileSize 102 | CacheNegotiatedDocs 103 | CacheRoot 104 | CacheStoreNoStore 105 | CacheStorePrivate 106 | CGIMapExtension 107 | CharsetDefault 108 | CharsetOptions 109 | CharsetSourceEnc 110 | CheckCaseOnly 111 | CheckSpelling 112 | ContentDigest 113 | CookieDomain 114 | CookieExpires 115 | CookieLog 116 | CookieName 117 | CookieStyle 118 | CookieTracking 119 | CoreDumpDirectory 120 | CustomLog 121 | Dav 122 | DavDepthInfinity 123 | DavGenericLockDB 124 | DavLockDB 125 | DavMinTimeout 126 | DBDExptime 127 | DBDKeep 128 | DBDMax 129 | DBDMin 130 | DBDParams 131 | DBDPersist 132 | DBDPrepareSQL 133 | DBDriver 134 | DefaultIcon 135 | DefaultLanguage 136 | DefaultType 137 | DeflateBufferSize 138 | DeflateCompressionLevel 139 | DeflateFilterNote 140 | DeflateMemLevel 141 | DeflateWindowSize 142 | Deny 143 | Directory 144 | DirectoryIndex 145 | DirectoryMatch 146 | DirectorySlash 147 | DocumentRoot 148 | DumpIOInput 149 | DumpIOLogLevel 150 | DumpIOOutput 151 | EnableExceptionHook 152 | EnableMMAP 153 | EnableSendfile 154 | ErrorDocument 155 | ErrorLog 156 | Example 157 | ExpiresActive 158 | ExpiresByType 159 | ExpiresDefault 160 | ExtendedStatus 161 | ExtFilterDefine 162 | ExtFilterOptions 163 | FileETag 164 | Files 165 | FilesMatch 166 | FilterChain 167 | FilterDeclare 168 | FilterProtocol 169 | FilterProvider 170 | FilterTrace 171 | ForceLanguagePriority 172 | ForceType 173 | ForensicLog 174 | GracefulShutdownTimeout 175 | Group 176 | Header 177 | HeaderName 178 | HostnameLookups 179 | IdentityCheck 180 | IdentityCheckTimeout 181 | IfDefine 182 | IfModule 183 | IfVersion 184 | ImapBase 185 | ImapDefault 186 | ImapMenu 187 | Include 188 | IndexIgnore 189 | IndexOptions 190 | IndexOrderDefault 191 | IndexStyleSheet 192 | ISAPIAppendLogToErrors 193 | ISAPIAppendLogToQuery 194 | ISAPICacheFile 195 | ISAPIFakeAsync 196 | ISAPILogNotSupported 197 | ISAPIReadAheadBuffer 198 | KeepAlive 199 | KeepAliveTimeout 200 | LanguagePriority 201 | LDAPCacheEntries 202 | LDAPCacheTTL 203 | LDAPConnectionTimeout 204 | LDAPOpCacheEntries 205 | LDAPOpCacheTTL 206 | LDAPSharedCacheFile 207 | LDAPSharedCacheSize 208 | LDAPTrustedClientCert 209 | LDAPTrustedGlobalCert 210 | LDAPTrustedMode 211 | LDAPVerifyServerCert 212 | Limit 213 | LimitExcept 214 | LimitInternalRecursion 215 | LimitRequestBody 216 | LimitRequestFields 217 | LimitRequestFieldSize 218 | LimitRequestLine 219 | LimitXMLRequestBody 220 | Listen 221 | ListenBackLog 222 | LoadFile 223 | LoadModule 224 | Location 225 | LocationMatch 226 | LockFile 227 | LogFormat 228 | LogLevel 229 | MaxClients 230 | MaxKeepAliveRequests 231 | MaxMemFree 232 | MaxRequestsPerChild 233 | MaxRequestsPerThread 234 | MaxSpareServers 235 | MaxSpareThreads 236 | MaxThreads 237 | MCacheMaxObjectCount 238 | MCacheMaxObjectSize 239 | MCacheMaxStreamingBuffer 240 | MCacheMinObjectSize 241 | MCacheRemovalAlgorithm 242 | MCacheSize 243 | MetaDir 244 | MetaFiles 245 | MetaSuffix 246 | MimeMagicFile 247 | MinSpareServers 248 | MinSpareThreads 249 | MMapFile 250 | ModMimeUsePathInfo 251 | MultiviewsMatch 252 | NameVirtualHost 253 | NoProxy 254 | NWSSLTrustedCerts 255 | NWSSLUpgradeable 256 | Options 257 | Order 258 | PassEnv 259 | PidFile 260 | ProtocolEcho 261 | Proxy 262 | ProxyBadHeader 263 | ProxyBlock 264 | ProxyDomain 265 | ProxyErrorOverride 266 | ProxyIOBufferSize 267 | ProxyMatch 268 | ProxyMaxForwards 269 | ProxyPass 270 | ProxyPassMatch 271 | ProxyPassReverse 272 | ProxyPassReverseCookieDomain 273 | ProxyPassReverseCookiePath 274 | ProxyPreserveHost 275 | ProxyReceiveBufferSize 276 | ProxyRemote 277 | ProxyRemoteMatch 278 | ProxyRequests 279 | ProxySet 280 | ProxyStatus 281 | ProxyTimeout 282 | ProxyVia 283 | ReadmeName 284 | ReceiveBufferSize 285 | Redirect 286 | RedirectMatch 287 | RedirectPermanent 288 | RedirectTemp 289 | RemoveCharset 290 | RemoveEncoding 291 | RemoveHandler 292 | RemoveInputFilter 293 | RemoveLanguage 294 | RemoveOutputFilter 295 | RemoveType 296 | RequestHeader 297 | Require 298 | RewriteBase 299 | RewriteCond 300 | RewriteEngine 301 | RewriteLock 302 | RewriteLog 303 | RewriteLogLevel 304 | RewriteMap 305 | RewriteOptions 306 | RewriteRule 307 | RLimitCPU 308 | RLimitMEM 309 | RLimitNPROC 310 | Satisfy 311 | ScoreBoardFile 312 | Script 313 | ScriptAlias 314 | ScriptAliasMatch 315 | ScriptInterpreterSource 316 | ScriptLog 317 | ScriptLogBuffer 318 | ScriptLogLength 319 | ScriptSock 320 | SecureListen 321 | SendBufferSize 322 | ServerAdmin 323 | ServerAlias 324 | ServerLimit 325 | ServerName 326 | ServerPath 327 | ServerRoot 328 | ServerSignature 329 | ServerTokens 330 | SetEnv 331 | SetEnvIf 332 | SetEnvIfNoCase 333 | SetHandler 334 | SetInputFilter 335 | SetOutputFilter 336 | SSIEndTag 337 | SSIErrorMsg 338 | SSIStartTag 339 | SSITimeFormat 340 | SSIUndefinedEcho 341 | SSLCACertificateFile 342 | SSLCACertificatePath 343 | SSLCADNRequestFile 344 | SSLCADNRequestPath 345 | SSLCARevocationFile 346 | SSLCARevocationPath 347 | SSLCertificateChainFile 348 | SSLCertificateFile 349 | SSLCertificateKeyFile 350 | SSLCipherSuite 351 | SSLCryptoDevice 352 | SSLEngine 353 | SSLHonorCipherOrder 354 | SSLMutex 355 | SSLOptions 356 | SSLPassPhraseDialog 357 | SSLProtocol 358 | SSLProxyCACertificateFile 359 | SSLProxyCACertificatePath 360 | SSLProxyCARevocationFile 361 | SSLProxyCARevocationPath 362 | SSLProxyCipherSuite 363 | SSLProxyEngine 364 | SSLProxyMachineCertificateFile 365 | SSLProxyMachineCertificatePath 366 | SSLProxyProtocol 367 | SSLProxyVerify 368 | SSLProxyVerifyDepth 369 | SSLRandomSeed 370 | SSLRequire 371 | SSLRequireSSL 372 | SSLSessionCache 373 | SSLSessionCacheTimeout 374 | SSLUserName 375 | SSLVerifyClient 376 | SSLVerifyDepth 377 | StartServers 378 | StartThreads 379 | SuexecUserGroup 380 | ThreadLimit 381 | ThreadsPerChild 382 | ThreadStackSize 383 | TimeOut 384 | TraceEnable 385 | TransferLog 386 | TypesConfig 387 | UnsetEnv 388 | UseCanonicalName 389 | UseCanonicalPhysicalPort 390 | User 391 | UserDir 392 | VirtualDocumentRoot 393 | VirtualDocumentRootIP 394 | VirtualHost 395 | VirtualScriptAlias 396 | VirtualScriptAliasIP 397 | Win32DisableAcceptEx 398 | XBitHack 399 | 400 | 401 | uuid 402 | 3A110F9B-69C1-4FEA-8B5A-B6CA9ED8F25B 403 | 404 | 405 | -------------------------------------------------------------------------------- /Syntaxes/Apache.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | fileTypes 6 | 7 | conf 8 | htaccess 9 | 10 | keyEquivalent 11 | ^~A 12 | name 13 | Apache 14 | patterns 15 | 16 | 17 | begin 18 | (^[ \t]+)?(?=#) 19 | beginCaptures 20 | 21 | 1 22 | 23 | name 24 | punctuation.whitespace.comment.leading.apache-config 25 | 26 | 27 | end 28 | (?!\G) 29 | patterns 30 | 31 | 32 | begin 33 | # 34 | beginCaptures 35 | 36 | 0 37 | 38 | name 39 | punctuation.definition.comment.apache-config 40 | 41 | 42 | end 43 | \n 44 | name 45 | comment.line.number-sign.apache-config 46 | 47 | 48 | 49 | 50 | captures 51 | 52 | 1 53 | 54 | name 55 | punctuation.definition.tag.apache-config 56 | 57 | 2 58 | 59 | name 60 | entity.name.tag.apache-config 61 | 62 | 3 63 | 64 | name 65 | punctuation.definition.tag.apache-config 66 | 67 | 4 68 | 69 | name 70 | meta.scope.between-tag-pair.apache-config 71 | 72 | 5 73 | 74 | name 75 | entity.name.tag.apache-config 76 | 77 | 6 78 | 79 | name 80 | punctuation.definition.tag.apache-config 81 | 82 | 83 | match 84 | ^[ ]*(<)([a-zA-Z0-9:]+)[^>]*(>(<)/)(\2)(>) 85 | name 86 | meta.tag.any.html 87 | 88 | 89 | begin 90 | ^[ ]*((<)(VirtualHost)(?:[ ]+([^>]+))?(>)) 91 | beginCaptures 92 | 93 | 1 94 | 95 | name 96 | meta.tag.apache-config 97 | 98 | 2 99 | 100 | name 101 | punctuation.definition.tag.apache-config 102 | 103 | 3 104 | 105 | name 106 | entity.name.tag.apache-config 107 | 108 | 4 109 | 110 | name 111 | meta.toc-list.virtual-host.apache-config 112 | 113 | 5 114 | 115 | name 116 | punctuation.definition.tag.apache-config 117 | 118 | 119 | end 120 | ^[ ]*((</)(VirtualHost)[^>]*(>)) 121 | endCaptures 122 | 123 | 1 124 | 125 | name 126 | meta.tag.apache-config 127 | 128 | 2 129 | 130 | name 131 | punctuation.definition.tag.apache-config 132 | 133 | 3 134 | 135 | name 136 | entity.name.tag.apache-config 137 | 138 | 4 139 | 140 | name 141 | punctuation.definition.tag.apache-config 142 | 143 | 144 | name 145 | meta.vhost.apache-config 146 | patterns 147 | 148 | 149 | include 150 | $base 151 | 152 | 153 | 154 | 155 | begin 156 | ^[ ]*((<)(Directory(?:Match)?)(?:[ ]+([^>]+))?(>)) 157 | beginCaptures 158 | 159 | 1 160 | 161 | name 162 | meta.tag.apache-config 163 | 164 | 2 165 | 166 | name 167 | punctuation.definition.tag.apache-config 168 | 169 | 3 170 | 171 | name 172 | entity.name.tag.apache-config 173 | 174 | 4 175 | 176 | name 177 | meta.toc-list.directory.apache-config 178 | 179 | 5 180 | 181 | name 182 | punctuation.definition.tag.apache-config 183 | 184 | 185 | end 186 | ^[ ]*((</)(Directory(?:Match)?)[^>]*(>)) 187 | endCaptures 188 | 189 | 1 190 | 191 | name 192 | meta.tag.apache-config 193 | 194 | 2 195 | 196 | name 197 | punctuation.definition.tag.apache-config 198 | 199 | 3 200 | 201 | name 202 | entity.name.tag.apache-config 203 | 204 | 4 205 | 206 | name 207 | punctuation.definition.tag.apache-config 208 | 209 | 210 | name 211 | meta.directory.apache-config 212 | patterns 213 | 214 | 215 | include 216 | $base 217 | 218 | 219 | 220 | 221 | begin 222 | ^[ ]*((<)(Location(?:Match)?)(?:[ ]+([^>]+))?(>)) 223 | beginCaptures 224 | 225 | 1 226 | 227 | name 228 | meta.tag.apache-config 229 | 230 | 2 231 | 232 | name 233 | punctuation.definition.tag.apache-config 234 | 235 | 3 236 | 237 | name 238 | entity.name.tag.apache-config 239 | 240 | 4 241 | 242 | name 243 | meta.toc-list.location.apache-config 244 | 245 | 5 246 | 247 | name 248 | punctuation.definition.tag.apache-config 249 | 250 | 251 | end 252 | ^[ ]*((</)(Location(?:Match)?)[^>]*(>)) 253 | endCaptures 254 | 255 | 1 256 | 257 | name 258 | meta.tag.apache-config 259 | 260 | 2 261 | 262 | name 263 | punctuation.definition.tag.apache-config 264 | 265 | 3 266 | 267 | name 268 | entity.name.tag.apache-config 269 | 270 | 4 271 | 272 | name 273 | punctuation.definition.tag.apache-config 274 | 275 | 276 | name 277 | meta.location.apache-config 278 | patterns 279 | 280 | 281 | include 282 | $base 283 | 284 | 285 | 286 | 287 | begin 288 | (^Include) 289 | beginCaptures 290 | 291 | 1 292 | 293 | name 294 | support.constant.include.start.apache-config 295 | 296 | 297 | end 298 | (\n) 299 | endCaptures 300 | 301 | 1 302 | 303 | name 304 | support.constant.include.end.apache-config 305 | 306 | 307 | name 308 | source.include.apache-config 309 | patterns 310 | 311 | 312 | match 313 | (.*) 314 | name 315 | text.include.apache-config 316 | 317 | 318 | 319 | 320 | begin 321 | ^[ ]*\b(RewriteCond)\b 322 | captures 323 | 324 | 1 325 | 326 | name 327 | support.constant.rewritecond.apache-config 328 | 329 | 330 | end 331 | $ 332 | patterns 333 | 334 | 335 | begin 336 | [ ]+ 337 | end 338 | $ 339 | patterns 340 | 341 | 342 | include 343 | #vars 344 | 345 | 346 | match 347 | [^ %\n]+ 348 | name 349 | string.regexp.rewrite-test.apache-config 350 | 351 | 352 | begin 353 | [ ]+ 354 | end 355 | $ 356 | patterns 357 | 358 | 359 | match 360 | [^ %\n]+ 361 | name 362 | string.other.rewrite-condition.apache-config 363 | 364 | 365 | captures 366 | 367 | 1 368 | 369 | name 370 | string.regexp.rewrite-operator.apache-config 371 | 372 | 373 | match 374 | [ ]+(\[[^\]]+\]) 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | begin 384 | ^[ ]*\b(RewriteRule)\b 385 | captures 386 | 387 | 1 388 | 389 | name 390 | support.constant.rewriterule.apache-config 391 | 392 | 393 | end 394 | $ 395 | patterns 396 | 397 | 398 | begin 399 | [ ]+ 400 | end 401 | $ 402 | patterns 403 | 404 | 405 | include 406 | #vars 407 | 408 | 409 | match 410 | [^ %]+ 411 | name 412 | string.regexp.rewrite-pattern.apache-config 413 | 414 | 415 | begin 416 | [ ]+ 417 | end 418 | $ 419 | patterns 420 | 421 | 422 | include 423 | #vars 424 | 425 | 426 | match 427 | [^ %\n]+ 428 | name 429 | string.other.rewrite-substitution.apache-config 430 | 431 | 432 | captures 433 | 434 | 1 435 | 436 | name 437 | string.regexp.rewrite-operator.apache-config 438 | 439 | 440 | match 441 | [ ]+(\[[^\]]+\]) 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | match 451 | \b(R(e(sourceConfig|direct(Match|Temp|Permanent)?|qu(ire|estHeader)|ferer(Ignore|Log)|write(Rule|Map|Base|Cond|Options|Engine|Lo(ck|g(Level)?))|admeName|move(Handler|Charset|Type|InputFilter|OutputFilter|Encoding|Language))|Limit(MEM|NPROC|CPU))|Group|XBitHack|M(MapFile|i(nSpare(Servers|Threads)|meMagicFile)|odMimeUsePathInfo|Cache(RemovalAlgorithm|M(inObjectSize|ax(StreamingBuffer|Object(Size|Count)))|Size)|ultiviewsMatch|eta(Suffix|Dir|Files)|ax(RequestsPer(Child|Thread)|MemFree|Spare(Servers|Threads)|Clients|Threads(PerChild)?|KeepAliveRequests))|B(indAddress|S2000Account|rowserMatch(NoCase)?)|S(hmemUIDisUser|c(oreBoardFile|ript(Sock|InterpreterSource|Log(Buffer|Length)?|Alias(Match)?)?)|tart(Servers|Threads)|S(I(StartTag|TimeFormat|UndefinedEcho|E(ndTag|rrorMsg))|L(R(equire(SSL)?|andomSeed)|Mutex|SessionCache(Timeout)?|C(ipherSuite|ertificate(ChainFile|KeyFile|File)|A(Revocation(Path|File)|Certificate(Path|File)))|Options|P(assPhraseDialog|ro(tocol|xy(MachineCertificate(Path|File)|C(ipherSuite|A(Revocation(Path|File)|Certificate(Path|File)))|Protocol|Engine|Verify(Depth)?)))|Engine|Verify(Client|Depth)))|uexecUserGroup|e(ndBufferSize|cureListen|t(Handler|InputFilter|OutputFilter|Env(If(NoCase)?)?)|rver(Root|Signature|Name|T(ype|okens)|Path|Limit|A(dmin|lias)))|atisfy)|H(ostnameLookups|eader(Name)?)|N(o(Cache|Proxy)|umServers|ameVirtualHost|WSSL(TrustedCerts|Upgradeable))|C(h(ildPerUserID|eckSpelling|arset(SourceEnc|Options|Default))|GI(MapExtension|CommandArgs)|o(ntentDigest|okie(Style|Name|Tracking|Domain|Prefix|Expires|Format|Log)|reDumpDirectory)|ustomLog|learModuleList|ache(Root|Gc(MemUsage|Clean|Interval|Daily|Unused)|M(inFileSize|ax(Expire|FileSize))|Size|NegotiatedDocs|TimeMargin|Ignore(NoLastMod|CacheControl)|D(i(sable|rLe(ngth|vels))|efaultExpire)|E(nable|xpiryCheck)|F(ile|orceCompletion)|LastModifiedFactor))|T(hread(sPerChild|StackSize|Limit)|ypesConfig|ime(out|Out)|ransferLog)|I(n(clude|dex(Ignore|O(ptions|rderDefault)))|SAPI(ReadAheadBuffer|CacheFile|FakeAsync|LogNotSupported|AppendLogTo(Errors|Query))|dentityCheck|f(Module|Define)|map(Menu|Base|Default))|O(ptions|rder)|D(irectory(Match|Slash|Index)?|ocumentRoot|e(ny|f(late(MemLevel|BufferSize|CompressionLevel|FilterNote|WindowSize)|ault(Type|Icon|Language)))|av(MinTimeout|DepthInfinity|LockDB)?)|U(se(CanonicalName|r(Dir)?)|nsetEnv)|P(idFile|ort|assEnv|ro(tocol(ReqCheck|Echo)|xy(Re(ceiveBufferSize|quests|mote(Match)?)|Ma(tch|xForwards)|B(lock|adHeader)|Timeout|IOBufferSize|Domain|P(ass(Reverse)?|reserveHost)|ErrorOverride|Via)?))|E(nable(MMAP|Sendfile|ExceptionHook)|BCDIC(Convert(ByType)?|Kludge)|rror(Header|Document|Log)|x(t(endedStatus|Filter(Options|Define))|pires(ByType|Default|Active)|ample))|Virtual(ScriptAlias(IP)?|Host|DocumentRoot(IP)?)|KeepAlive(Timeout)?|F(ile(s(Match)?|ETag)|or(ce(Type|LanguagePriority)|ensicLog)|ancyIndexing)|Win32DisableAcceptEx|L(i(sten(Back(log|Log))?|mit(Request(Body|Field(s(ize)?|Size)|Line)|XMLRequestBody|InternalRecursion|Except)?)|o(c(kFile|ation(Match)?)|ad(Module|File)|g(Format|Level))|DAP(SharedCache(Size|File)|Cache(TTL|Entries)|TrustedCA(Type)?|OpCache(TTL|Entries))|anguagePriority)|A(ssignUserID|nonymous(_(MustGiveEmail|NoUserID|VerifyEmail|LogEmail|Authoritative))?|c(ce(ss(Config|FileName)|pt(Mutex|PathInfo|Filter))|tion)|dd(Module(Info)?|Handler|Charset|Type|I(nputFilter|con(By(Type|Encoding))?)|OutputFilter(ByType)?|De(scription|faultCharset)|Encoding|Language|Alt(By(Type|Encoding))?)|uth(GroupFile|Name|Type|D(B(GroupFile|M(GroupFile|Type|UserFile|Authoritative)|UserFile|Authoritative)|igest(GroupFile|ShmemSize|N(cCheck|once(Format|Lifetime))|Domain|Qop|File|Algorithm))|UserFile|LDAP(RemoteUserIsDN|GroupAttribute(IsDN)?|Bind(DN|Password)|C(harsetConfig|ompareDNOnServer)|DereferenceAliases|Url|Enabled|FrontPageHack|Authoritative)|Authoritative)|l(ias(Match)?|low(CONNECT|Override|EncodedSlashes)?)|gentLog)|MIMEMagicFile|WSGI(.[^ ]+))\b 452 | name 453 | support.constant.apache-config 454 | 455 | 456 | match 457 | \b(access_module|actions_module|action_module|alias_module|anon_auth_module|asis_module|authn_alias_module|authn_anon_module|authn_dbd_module|authn_dbm_module|authn_default_module|authn_file_module|authnz_ldap_module|authz_dbm_module|authz_default_module|authz_groupfile_module|authz_host_module|authz_owner_module|authz_user_module|auth_basic_module|auth_digest_module|auth_module|autoindex_module|bonjour_module|cache_module|cern_meta_module|cgi_module|config_log_module|dav_fs_module|dav_module|dbd_module|dbm_auth_module|deflate_module|digest_module|dir_module|disk_cache_module|dumpio_module|env_module|expires_module|ext_filter_module|fastcgi_module|filter_module|foo_module|headers_module|hfs_apple_module|ident_module|imagemap_module|imap_module|includes_module|include_module|info_module|jk_module|ldap_module|logio_module|log_config_module|log_forensic_module|mem_cache_module|mime_magic_module|mime_module|negotiation_module|perl_module|php4_module|php5_module|proxy_ajp_module|proxy_balancer_module|proxy_connect_module|proxy_ftp_module|proxy_http_module|proxy_module|rendezvous_apple_module|rendezvous_module|rewrite_module|setenvif_module|speling_module|ssl_module|status_module|suexec_module|substitute_module|unique_id_module|userdir_module|usertrack_module|version_module|vhost_alias_module|wsgi_module)\b 458 | name 459 | support.class.apache-config 460 | 461 | 462 | begin 463 | " 464 | beginCaptures 465 | 466 | 0 467 | 468 | name 469 | punctuation.definition.string.begin.apache-config 470 | 471 | 472 | end 473 | "(?!") 474 | endCaptures 475 | 476 | 0 477 | 478 | name 479 | punctuation.definition.string.end.apache-config 480 | 481 | 482 | name 483 | string.quoted.double.apache-config 484 | patterns 485 | 486 | 487 | match 488 | "" 489 | name 490 | constant.character.escape.apostrophe.apache 491 | 492 | 493 | 494 | 495 | begin 496 | (</?)([a-zA-Z]+) 497 | captures 498 | 499 | 1 500 | 501 | name 502 | punctuation.definition.tag.apache-config 503 | 504 | 2 505 | 506 | name 507 | entity.name.tag.apache-config 508 | 509 | 510 | end 511 | (/?>) 512 | name 513 | meta.tag.apache-config 514 | 515 | 516 | repository 517 | 518 | vars 519 | 520 | patterns 521 | 522 | 523 | captures 524 | 525 | 1 526 | 527 | name 528 | punctuation.definition.variable.apache-config 529 | 530 | 3 531 | 532 | name 533 | punctuation.definition.variable.apache-config 534 | 535 | 536 | match 537 | (%\{)(?:API_VERSION|AUTH_TYPE|CONN_REMOTE_ADDR|CONTEXT_(?:PREFIX|DOCUMENT_ROOT)|DOCUMENT_ROOT|HTTP(S|_(?:ACCEPT|COOKIE|FORWARDED|HOST|PROXY_CONNECTION|REFERER|USER_AGENT))|IPV6|IS_SUBREQ|REMOTE_(?:ADDR|HOST|IDENT|PORT|USER)|REQUEST_(?:FILENAME|METHOD|SCHEME|URI)|SCRIPT_(?:FILENAME|GROUP|USER)|PATH_INFO|QUERY_STRING|SERVER_(?:ADDR|ADMIN|NAME|PORT|PROTOCOL|SOFTWARE)|THE_REQUEST|TIME_(?:YEAR|MON|DAY|HOUR|MIN|SEC|WDAY)|TIME|(?:ENV|HTTP|LA-F|LA-U|SSL):[^\}]+)(\}) 538 | name 539 | support.variable.apache-config 540 | 541 | 542 | match 543 | %\{[^\}]+\} 544 | name 545 | invalid.illegal.bad-var.apache-config 546 | 547 | 548 | 549 | 550 | scopeName 551 | source.apache-config 552 | uuid 553 | 023D670E-80F1-11D9-9BD1-00039398C572 554 | 555 | 556 | -------------------------------------------------------------------------------- /Support/data/apache_doc_dictionary.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | AcceptFilter 4 | AcceptMutex 5 | AcceptPathInfo 6 | AccessFileName 7 | Action 8 | AddAlt 9 | AddAltByEncoding 10 | AddAltByType 11 | AddCharset 12 | AddDefaultCharset 13 | AddDescription 14 | AddEncoding 15 | AddHandler 16 | AddIcon 17 | AddIconByEncoding 18 | AddIconByType 19 | AddInputFilter 20 | AddLanguage 21 | AddModuleInfo 22 | AddOutputFilter 23 | AddOutputFilterByType 24 | AddType 25 | Alias 26 | AliasMatch 27 | Allow 28 | AllowCONNECT 29 | AllowEncodedSlashes 30 | AllowOverride 31 | Anonymous 32 | Anonymous_LogEmail 33 | Anonymous_MustGiveEmail 34 | Anonymous_NoUserID 35 | Anonymous_VerifyEmail 36 | AuthBasicAuthoritative 37 | AuthBasicProvider 38 | AuthDBDUserPWQuery 39 | AuthDBDUserRealmQuery 40 | AuthDBMGroupFile 41 | AuthDBMType 42 | AuthDBMUserFile 43 | AuthDefaultAuthoritative 44 | AuthDigestAlgorithm 45 | AuthDigestDomain 46 | AuthDigestNcCheck 47 | AuthDigestNonceFormat 48 | AuthDigestNonceLifetime 49 | AuthDigestProvider 50 | AuthDigestQop 51 | AuthDigestShmemSize 52 | AuthGroupFile 53 | AuthLDAPBindDN 54 | AuthLDAPBindPassword 55 | AuthLDAPCharsetConfig 56 | AuthLDAPCompareDNOnServer 57 | AuthLDAPDereferenceAliases 58 | AuthLDAPGroupAttribute 59 | AuthLDAPGroupAttributeIsDN 60 | AuthLDAPRemoteUserAttribute 61 | AuthLDAPRemoteUserIsDN 62 | AuthLDAPUrl 63 | AuthName 64 | AuthnProviderAlias 65 | AuthType 66 | AuthUserFile 67 | AuthzDBMAuthoritative 68 | AuthzDBMType 69 | AuthzDefaultAuthoritative 70 | AuthzGroupFileAuthoritative 71 | AuthzLDAPAuthoritative 72 | AuthzOwnerAuthoritative 73 | AuthzUserAuthoritative 74 | BalancerMember 75 | BrowserMatch 76 | BrowserMatchNoCase 77 | BufferedLogs 78 | CacheDefaultExpire 79 | CacheDirLength 80 | CacheDirLevels 81 | CacheDisable 82 | CacheEnable 83 | CacheFile 84 | CacheIgnoreCacheControl 85 | CacheIgnoreHeaders 86 | CacheIgnoreNoLastMod 87 | CacheIgnoreQueryString 88 | CacheLastModifiedFactor 89 | CacheMaxExpire 90 | CacheMaxFileSize 91 | CacheMinFileSize 92 | CacheNegotiatedDocs 93 | CacheRoot 94 | CacheStoreNoStore 95 | CacheStorePrivate 96 | CGIMapExtension 97 | CharsetDefault 98 | CharsetOptions 99 | CharsetSourceEnc 100 | CheckCaseOnly 101 | CheckSpelling 102 | ContentDigest 103 | CookieDomain 104 | CookieExpires 105 | CookieLog 106 | CookieName 107 | CookieStyle 108 | CookieTracking 109 | CoreDumpDirectory 110 | CustomLog 111 | Dav 112 | DavDepthInfinity 113 | DavGenericLockDB 114 | DavLockDB 115 | DavMinTimeout 116 | DBDExptime 117 | DBDKeep 118 | DBDMax 119 | DBDMin 120 | DBDParams 121 | DBDPersist 122 | DBDPrepareSQL 123 | DBDriver 124 | DefaultIcon 125 | DefaultLanguage 126 | DefaultType 127 | DeflateBufferSize 128 | DeflateCompressionLevel 129 | DeflateFilterNote 130 | DeflateMemLevel 131 | DeflateWindowSize 132 | Deny 133 | Directory 134 | DirectoryIndex 135 | DirectoryMatch 136 | DirectorySlash 137 | DocumentRoot 138 | DumpIOInput 139 | DumpIOLogLevel 140 | DumpIOOutput 141 | EnableExceptionHook 142 | EnableMMAP 143 | EnableSendfile 144 | ErrorDocument 145 | ErrorLog 146 | Example 147 | ExpiresActive 148 | ExpiresByType 149 | ExpiresDefault 150 | ExtendedStatus 151 | ExtFilterDefine 152 | ExtFilterOptions 153 | FileETag 154 | Files 155 | FilesMatch 156 | FilterChain 157 | FilterDeclare 158 | FilterProtocol 159 | FilterProvider 160 | FilterTrace 161 | ForceLanguagePriority 162 | ForceType 163 | ForensicLog 164 | GracefulShutdownTimeout 165 | Group 166 | Header 167 | HeaderName 168 | HostnameLookups 169 | IdentityCheck 170 | IdentityCheckTimeout 171 | IfDefine 172 | IfModule 173 | IfVersion 174 | ImapBase 175 | ImapDefault 176 | ImapMenu 177 | Include 178 | IndexIgnore 179 | IndexOptions 180 | IndexOrderDefault 181 | IndexStyleSheet 182 | ISAPIAppendLogToErrors 183 | ISAPIAppendLogToQuery 184 | ISAPICacheFile 185 | ISAPIFakeAsync 186 | ISAPILogNotSupported 187 | ISAPIReadAheadBuffer 188 | KeepAlive 189 | KeepAliveTimeout 190 | LanguagePriority 191 | LDAPCacheEntries 192 | LDAPCacheTTL 193 | LDAPConnectionTimeout 194 | LDAPOpCacheEntries 195 | LDAPOpCacheTTL 196 | LDAPSharedCacheFile 197 | LDAPSharedCacheSize 198 | LDAPTrustedClientCert 199 | LDAPTrustedGlobalCert 200 | LDAPTrustedMode 201 | LDAPVerifyServerCert 202 | Limit 203 | LimitExcept 204 | LimitInternalRecursion 205 | LimitRequestBody 206 | LimitRequestFields 207 | LimitRequestFieldSize 208 | LimitRequestLine 209 | LimitXMLRequestBody 210 | Listen 211 | ListenBackLog 212 | LoadFile 213 | LoadModule 214 | Location 215 | LocationMatch 216 | LockFile 217 | LogFormat 218 | LogLevel 219 | MaxClients 220 | MaxKeepAliveRequests 221 | MaxMemFree 222 | MaxRequestsPerChild 223 | MaxRequestsPerThread 224 | MaxSpareServers 225 | MaxSpareThreads 226 | MaxThreads 227 | MCacheMaxObjectCount 228 | MCacheMaxObjectSize 229 | MCacheMaxStreamingBuffer 230 | MCacheMinObjectSize 231 | MCacheRemovalAlgorithm 232 | MCacheSize 233 | MetaDir 234 | MetaFiles 235 | MetaSuffix 236 | MimeMagicFile 237 | MinSpareServers 238 | MinSpareThreads 239 | MMapFile 240 | ModMimeUsePathInfo 241 | MultiviewsMatch 242 | NameVirtualHost 243 | NoProxy 244 | NWSSLTrustedCerts 245 | NWSSLUpgradeable 246 | Options 247 | Order 248 | PassEnv 249 | PidFile 250 | ProtocolEcho 251 | Proxy 252 | ProxyBadHeader 253 | ProxyBlock 254 | ProxyDomain 255 | ProxyErrorOverride 256 | ProxyIOBufferSize 257 | ProxyMatch 258 | ProxyMaxForwards 259 | ProxyPass 260 | ProxyPassMatch 261 | ProxyPassReverse 262 | ProxyPassReverseCookieDomain 263 | ProxyPassReverseCookiePath 264 | ProxyPreserveHost 265 | ProxyReceiveBufferSize 266 | ProxyRemote 267 | ProxyRemoteMatch 268 | ProxyRequests 269 | ProxySet 270 | ProxyStatus 271 | ProxyTimeout 272 | ProxyVia 273 | ReadmeName 274 | ReceiveBufferSize 275 | Redirect 276 | RedirectMatch 277 | RedirectPermanent 278 | RedirectTemp 279 | RemoveCharset 280 | RemoveEncoding 281 | RemoveHandler 282 | RemoveInputFilter 283 | RemoveLanguage 284 | RemoveOutputFilter 285 | RemoveType 286 | RequestHeader 287 | Require 288 | RewriteBase 289 | RewriteCond 290 | RewriteEngine 291 | RewriteLock 292 | RewriteLog 293 | RewriteLogLevel 294 | RewriteMap 295 | RewriteOptions 296 | RewriteRule 297 | RLimitCPU 298 | RLimitMEM 299 | RLimitNPROC 300 | Satisfy 301 | ScoreBoardFile 302 | Script 303 | ScriptAlias 304 | ScriptAliasMatch 305 | ScriptInterpreterSource 306 | ScriptLog 307 | ScriptLogBuffer 308 | ScriptLogLength 309 | ScriptSock 310 | SecureListen 311 | SendBufferSize 312 | ServerAdmin 313 | ServerAlias 314 | ServerLimit 315 | ServerName 316 | ServerPath 317 | ServerRoot 318 | ServerSignature 319 | ServerTokens 320 | SetEnv 321 | SetEnvIf 322 | SetEnvIfNoCase 323 | SetHandler 324 | SetInputFilter 325 | SetOutputFilter 326 | SSIEndTag 327 | SSIErrorMsg 328 | SSIStartTag 329 | SSITimeFormat 330 | SSIUndefinedEcho 331 | SSLCACertificateFile 332 | SSLCACertificatePath 333 | SSLCADNRequestFile 334 | SSLCADNRequestPath 335 | SSLCARevocationFile 336 | SSLCARevocationPath 337 | SSLCertificateChainFile 338 | SSLCertificateFile 339 | SSLCertificateKeyFile 340 | SSLCipherSuite 341 | SSLCryptoDevice 342 | SSLEngine 343 | SSLHonorCipherOrder 344 | SSLMutex 345 | SSLOptions 346 | SSLPassPhraseDialog 347 | SSLProtocol 348 | SSLProxyCACertificateFile 349 | SSLProxyCACertificatePath 350 | SSLProxyCARevocationFile 351 | SSLProxyCARevocationPath 352 | SSLProxyCipherSuite 353 | SSLProxyEngine 354 | SSLProxyMachineCertificateFile 355 | SSLProxyMachineCertificatePath 356 | SSLProxyProtocol 357 | SSLProxyVerify 358 | SSLProxyVerifyDepth 359 | SSLRandomSeed 360 | SSLRequire 361 | SSLRequireSSL 362 | SSLSessionCache 363 | SSLSessionCacheTimeout 364 | SSLUserName 365 | SSLVerifyClient 366 | SSLVerifyDepth 367 | StartServers 368 | StartThreads 369 | SuexecUserGroup 370 | ThreadLimit 371 | ThreadsPerChild 372 | ThreadStackSize 373 | TimeOut 374 | TraceEnable 375 | TransferLog 376 | TypesConfig 377 | UnsetEnv 378 | UseCanonicalName 379 | UseCanonicalPhysicalPort 380 | User 381 | UserDir 382 | VirtualDocumentRoot 383 | VirtualDocumentRootIP 384 | VirtualHost 385 | VirtualScriptAlias 386 | VirtualScriptAliasIP 387 | Win32DisableAcceptEx 388 | XBitHack 389 | 390 | core 391 | mpm_common 392 | beos 393 | event 394 | mpm_netware 395 | mpmt_os2 396 | prefork 397 | mpm_winnt 398 | worker 399 | mod_actions 400 | mod_alias 401 | mod_asis 402 | mod_authn_alias 403 | mod_authn_dbd 404 | mod_authn_dbm 405 | mod_authn_default 406 | mod_authn_file 407 | mod_auth_basic 408 | mod_auth_digest 409 | mod_authnz_ldap 410 | mod_authz_dbm 411 | mod_authz_default 412 | mod_authz_groupfile 413 | mod_authz_host 414 | mod_authz_owner 415 | mod_authz_user 416 | mod_autoindex 417 | mod_cache 418 | mod_cern_meta 419 | mod_cgi 420 | mod_cgid 421 | mod_charset_lite 422 | mod_dav 423 | mod_dav_fs 424 | mod_dav_lock 425 | mod_dbd 426 | mod_deflate 427 | mod_dir 428 | mod_disk_cache 429 | mod_dumpio 430 | mod_echo 431 | mod_env 432 | mod_example 433 | mod_expires 434 | mod_ext_filter 435 | mod_file_cache 436 | mod_filter 437 | mod_headers 438 | mod_ident 439 | mod_imagemap 440 | mod_include 441 | mod_info 442 | mod_isapi 443 | mod_ldap 444 | mod_log_config 445 | mod_log_forensic 446 | mod_logio 447 | mod_mem_cache 448 | mod_mime 449 | mod_mime_magic 450 | mod_negotiation 451 | mod_nw_ssl 452 | mod_proxy 453 | mod_proxy_ajp 454 | mod_proxy_balancer 455 | mod_proxy_connect 456 | mod_proxy_ftp 457 | mod_proxy_http 458 | mod_rewrite 459 | mod_setenvif 460 | mod_so 461 | mod_speling 462 | mod_ssl 463 | mod_status 464 | mod_substitute 465 | mod_suexec 466 | mod_unique_id 467 | mod_userdir 468 | mod_usertrack 469 | mod_version 470 | mod_vhost_alias 471 | 472 | actions_module 473 | alias_module 474 | asis_module 475 | authn_anon_module 476 | authn_dbd_module 477 | authn_dbm_module 478 | authn_default_module 479 | authn_file_module 480 | authz_dbm_module 481 | authz_default_module 482 | authz_groupfile_module 483 | authz_host_module 484 | authz_owner_module 485 | authz_user_module 486 | auth_basic_module 487 | auth_digest_module 488 | autoindex_module 489 | bonjour_module 490 | cache_module 491 | cern_meta_module 492 | cgi_module 493 | dav_fs_module 494 | dav_module 495 | dbd_module 496 | deflate_module 497 | dir_module 498 | disk_cache_module 499 | dumpio_module 500 | env_module 501 | expires_module 502 | ext_filter_module 503 | fastcgi_module 504 | filter_module 505 | headers_module 506 | ident_module 507 | imagemap_module 508 | include_module 509 | info_module 510 | logio_module 511 | log_config_module 512 | log_forensic_module 513 | mem_cache_module 514 | mime_magic_module 515 | mime_module 516 | negotiation_module 517 | proxy_ajp_module 518 | proxy_balancer_module 519 | proxy_connect_module 520 | proxy_ftp_module 521 | proxy_http_module 522 | proxy_module 523 | rewrite_module 524 | setenvif_module 525 | speling_module 526 | ssl_module 527 | status_module 528 | unique_id_module 529 | userdir_module 530 | usertrack_module 531 | version_module 532 | vhost_alias_module 533 | --------------------------------------------------------------------------------