Skip to content

Commit

Permalink
Update webkitpy scripts to start Apache on Haiku
Browse files Browse the repository at this point in the history
Does not work yet because Apache complains about being run as the root
user.
  • Loading branch information
pulkomandy committed Sep 17, 2024
1 parent a2ebdc5 commit 74df5d3
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 0 deletions.
152 changes: 152 additions & 0 deletions LayoutTests/http/conf/apache2.4-haiku-httpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
ServerRoot "/system"

Mutex file:/tmp/WebKit
PidFile "/tmp/WebKit/httpd.pid"
ScoreBoardFile "/var/shared_memory/WebKit_httpd.scoreboard"

Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15

#MinSpareServers 1
#MaxSpareServers 5
#StartServers 1
#MaxRequestWorkers 150
#MaxConnectionsPerChild 100000

LoadModule autoindex_module lib/apache/mod_autoindex.so
LoadModule unixd_module lib/apache/mod_unixd.so
LoadModule access_compat_module lib/apache/mod_access_compat.so
LoadModule authn_core_module lib/apache/mod_authn_core.so
LoadModule authz_core_module lib/apache/mod_authz_core.so
LoadModule authz_host_module lib/apache/mod_authz_host.so
LoadModule include_module lib/apache/mod_include.so
LoadModule log_config_module lib/apache/mod_log_config.so
LoadModule headers_module lib/apache/mod_headers.so
LoadModule ssl_module lib/apache/mod_ssl.so
LoadModule mime_module lib/apache/mod_mime.so

LoadModule asis_module lib/apache/mod_asis.so
LoadModule cgi_module lib/apache/mod_cgi.so
LoadModule negotiation_module lib/apache/mod_negotiation.so
#LoadModule imagemap_module lib/apache/mod_imagemap.so
LoadModule actions_module lib/apache/mod_actions.so
LoadModule alias_module lib/apache/mod_alias.so
LoadModule rewrite_module lib/apache/mod_rewrite.so

ServerName 127.0.0.1

<Directory />
Options Indexes FollowSymLinks MultiViews ExecCGI Includes
AllowOverride All
Order allow,deny
Allow from all
CGIPassAuth On
</Directory>

AccessFileName .htaccess

<Files ~ "^\.([Hh][Tt]|[Dd][Ss]_[Ss])">
Order allow,deny
Deny from all
Satisfy All
</Files>

UseCanonicalName On
HostnameLookups Off

LogLevel warn

ErrorLog "/tmp/WebKit/error_log.txt"

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b %D" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

ServerSignature On

<IfModule mod_alias.c>
</IfModule>

<IfModule mod_mime.c>
AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .ee
AddLanguage fr .fr
AddLanguage de .de
AddLanguage el .el
AddLanguage he .he
AddCharset ISO-8859-8 .iso8859-8
AddLanguage it .it
AddLanguage ja .ja
AddCharset ISO-2022-JP .jis
AddLanguage kr .kr
AddCharset ISO-2022-KR .iso-kr
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddCharset ISO-8859-2 .iso-pl
AddLanguage pt .pt
AddLanguage pt-br .pt-br
AddLanguage ltz .lu
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .sv
AddLanguage cs .cz .cs
AddLanguage ru .ru
AddLanguage zh-TW .zh-tw
AddCharset Big5 .Big5 .big5
AddCharset WINDOWS-1251 .cp-1251
AddCharset CP866 .cp866
AddCharset ISO-8859-5 .iso-ru
AddCharset KOI8-R .koi8-r
AddCharset UCS-2 .ucs2
AddCharset UCS-4 .ucs4
AddCharset UTF-8 .utf8

<IfModule mod_negotiation.c>
LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
</IfModule>

AddType application/x-tar .tgz

AddEncoding x-compress .Z
AddEncoding x-gzip .gz .tgz

AddHandler cgi-script .cgi .pl .py

AddType text/html .shtml
AddHandler server-parsed .shtml

AddHandler send-as-is asis
</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
</IfModule>

<VirtualHost *:8443>
ServerName 127.0.0.1
SSLEngine On
</VirtualHost>

#
# Apple-specific filesystem protection.
#
<Files "rsrc">
Order allow,deny
Deny from all
Satisfy All
</Files>

<Directory ~ ".*\.\.namedfork">
Order allow,deny
Deny from all
Satisfy All
CGIPassAuth On
</Directory>
2 changes: 2 additions & 0 deletions Tools/Scripts/webkitpy/port/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,8 @@ def _apache_config_file_name_for_platform(self, sys_platform):
return 'win-httpd-' + self._apache_version() + '.conf'
if sys_platform == 'darwin':
return 'apache' + self._apache_version() + '-darwin-httpd.conf'
if sys_platform == 'haiku1':
return 'apache' + self._apache_version() + '-haiku-httpd.conf'
if sys_platform.startswith('linux'):
if self._is_redhat_based():
return 'fedora-httpd-' + self._apache_version() + '.conf'
Expand Down
3 changes: 3 additions & 0 deletions Tools/Scripts/webkitpy/port/haiku.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ def _driver_class(self):
def _path_to_driver(self):
return self._build_path('bin', self.driver_name())

def _path_to_apache(self):
return "/system/bin/httpd"

def _path_to_image_diff(self):
return self._build_path('bin', 'ImageDiff')

Expand Down

0 comments on commit 74df5d3

Please sign in to comment.