Bernd87: javascritp-Variable übergeben

Beitrag lesen

Hallo zusammen!

# ======================================================================================

# httpd.conf (ohne Pkt. vorneweg  ;) )


#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.....BLA BLA

ServerRoot "c:/Apache24"


# ...BLA BLA   weiterführend nur das Aktive im Text
#
#Listen 12.34.56.78:80
Listen 192.168.2.88:80   #alt
#Listen 192.168.2.88:8888	#test mit arduino


#
# Dynamic Shared Object (DSO) Support
#

LoadModule access_compat_module modules/mod_access_compat.so
#==========================================================================
#Allow from 192.168.2.1 192.168.2.255
#==========================================================================
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule allowmethods_module modules/mod_allowmethods.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so

LoadModule authn_core_module modules/mod_authn_core.so


LoadModule authn_file_module modules/mod_authn_file.so

LoadModule authz_core_module modules/mod_authz_core.so

LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so

LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so

LoadModule cgi_module modules/mod_cgi.so

LoadModule dir_module modules/mod_dir.so

LoadModule env_module modules/mod_env.so


LoadModule headers_module modules/mod_headers.so

# <IfModule mod_setenvif.c>

#    <IfModule mod_headers.c>
 
#       SetEnvIf Origin "http://192.16.2.226/" IS_CORS

#		Header set Access-Control-Allow-Origin "*" 
 
#   </IfModule>

# </IfModule>



LoadModule include_module modules/mod_include.so

LoadModule isapi_module modules/mod_isapi.so

LoadModule log_config_module modules/mod_log_config.so

LoadModule mime_module modules/mod_mime.so

LoadModule negotiation_module modules/mod_negotiation.so

LoadModule setenvif_module modules/mod_setenvif.so

#
#For PHP 5 do something like this:
LoadModule php5_module "c:/PHP/php5apache2_4.dll"
AddType application/x-httpd-php .php


#
#configure the path to php.ini
PHPIniDir "C:/php"

<IfModule unixd_module>

User daemon
Group daemon

</IfModule>
# 'Main' server configuration

ServerAdmin admin@example.com


<Directory />
    AllowOverride none
    Require all denied
	
</Directory>
#DocumentRoot "C:/Windows/PHP"		
#Verzeichnis indem sich PHP befindet

DocumentRoot "c:/MASTERARBEIT/pausensignal"
<Directory "c:/MASTERARBEIT/pausensignal">
	Options Indexes FollowSymLinks
	AllowOverride all
	Require all granted
</Directory>

#
# Ordner der Passwortsicherung enthält
<Directory "c:/Apache24/protect">					
	AuthName "pausensignal"
	AuthType Basic
	AuthUserFile "C:/Apache24/protect/.htpasswd"
	require user Administrator
	AllowOverride All	
</Directory>


<IfModule dir_module>
    DirectoryIndex index.php index.html
</IfModule>

<Files ".ht*">
    Require all denied
</Files>

ErrorLog "logs/error.log"
LogLevel warn

<IfModule log_config_module>
    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    #
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

  <IfModule logio_module>
    # You need to enable mod_logio.c to use %I and %O
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  </IfModule>

 
</IfModule>

<IfModule alias_module>
  
ScriptAlias /cgi-bin/ "c:/Apache24/cgi-bin/"

</IfModule>

<IfModule cgid_module>
  
</IfModule>


<Directory "c:/Apache24/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
</Directory>

<IfModule mime_module>
   
 TypesConfig conf/mime.types

   
 AddType application/x-compress .Z
 AddType application/x-gzip .gz .tgz

    
 AddType application/x-httpd-php .php
</IfModule>


<IfModule proxy_html_module>
Include conf/extra/proxy-html.conf
</IfModule>

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>



# ===============================================================================

Was ich auch probiert hab, es hat nix geholfen!!!! (hab nur dreimal geheult ;) )

Was man mit den Blöcken <Directory>, <Location>, <Files> oder <VirtualHost> macht erschließt sich mir ebenfalls nicht!!!! deshalb wie bei allen anderen <IfModul mod_xy>

Dann hab ich mir nochmal die Fehlermeldung angesehen und den Header des Arduinos...(nicht PasPi)

## HTTP/1.1 200 OK\n

## Content-Type: text/html\n ... usw.

...mit

## Access-Control-Allow-Origin: http://pausensignal.localdomain

vervollständigt und siehe da... Es funktioniert.

Der Sinn erschließt sich mir jetzt dennoch nicht so richtig. Der Server hatte eigentlich nur die Aufgabe diese Fehlermeldung zu missachten. was ja wahrscheinlich auch geht, mit den richtigen Einstellungen.

Die Einstellungen sind aber eigentlich nur dafür da um Schwachstellen in die Ethernet-Kommunikation zu integrieren. Also gesetzt den Fall: mein anzusprechender Arduino ist ein weiterer Server ohne diese Einstellungen zum "umgehen der Sicherheitskriterien" würde die Kommunikation auch scheitern.

...Aber dennoch würde mich interessieren wie diese Einstellung vollbracht werden kann!

Hochachtungsvollen Danke, der Bernd