php.de

Zurück   php.de > Webentwicklung > Server, Hosting und Workstations

Server, Hosting und Workstations Server-Konfigurationsdateien (.htaccess/httpd.conf) und Arbeiten auf Serverebene

Antwort
 
LinkBack Themen-Optionen Thema bewerten
Alt 19.11.2004, 10:05  
Erfahrener Benutzer
 
Registriert seit: 01.09.2004
Beiträge: 532
PHP-Kenntnisse:
Fortgeschritten
schifti
Standard Apache2 Linux, kann nicht .htaccess

Hi, ich habe ein Apache2 unter Linux 9.1 Pro laufen, aber er kann keine .htaccess Datein ausführen.

Meine Frage, gibt es irgendwo eine Configdatei, wo ich das einstellen kann, oder muss ich ein Modul installiern und welches?
__________________
MFG Schifti
auch ein Forum (PHP)
schifti ist offline   Mit Zitat antworten
Sponsor Mitteilung
PHP Code Flüsterer

Registriert seit: 21.08.2005
Beiträge: 4682
PHP-Kenntnisse:
Fortgeschritten

Alt 19.11.2004, 14:43  
Gast
 
Beiträge: n/a
Standard

Eigentlich müsste das funktionieren, poste mal deine httpd.conf (oder heißt das apache2.conf beim 2er?)....
  Mit Zitat antworten
Alt 19.11.2004, 15:04  
Erfahrener Benutzer
 
Registriert seit: 01.09.2004
Beiträge: 532
PHP-Kenntnisse:
Fortgeschritten
schifti
Standard

Aber gerade hat mein Ausbilder da rum gepfuscht und jetzt geht nicht mal mehr die Ordner Auflistung


Das ist die httpd.conf:

Include /etc/apache2/mod_autoindex-defaults.conf

# associate MIME types with filename extensions
TypesConfig /etc/apache2/mime.types
DefaultType text/plain
Include /etc/apache2/mod_mime-defaults.conf

# set up (customizable) error responses
Include /etc/apache2/errors.conf

# global (server-wide) SSL configuration, that is not specific to
# any virtual host
Include /etc/apache2/ssl-global.conf

s is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs-2.0/> for detailed information about
# the directives.

# Based upon the default apache configuration file that ships with apache,
# which is based upon the NCSA server configuration files originally by Rob
# McCool. This file was knocked together by Peter Poeml <poeml+apache@suse.de>.

# If possible, avoid changes to this file. It does mainly contain Include
# statements and global settings that can/should be overridden in the
# configuration of your virtual hosts.


# Overview of include files, chronologically:
#
# httpd.conf
# |
# |-- uid.conf . . . . . . . . . . . . . . UserID/GroupID to run under
# |-- server-tuning.conf . . . . . . . . . sizing of the server (how many processes to start, ...)
# |-- sysconfig.d/loadmodule.conf . . . . .[*] load these modules
# |-- listen.conf . . . . . . . . . . . . . IP adresses / ports to listen on
# |-- mod_log_config.conf . . . . . . . . . define logging formats
# |-- sysconfig.d/global.conf . . . . . . .[*] server-wide general settings
# |-- mod_status.conf . . . . . . . . . . . restrict access to mod_status (server monitoring)
# |-- mod_info.conf . . . . . . . . . . . . restrict access to mod_info
# |-- mod_usertrack.conf . . . . . . . . . defaults for cookie-based user tracking
# |-- mod_autoindex-defaults.conf . . . . . defaults for displaying of server-generated directory listings
# |-- mod_mime-defaults.conf . . . . . . . defaults for mod_mime configuration
# |-- errors.conf . . . . . . . . . . . . . customize error responses
# |-- ssl-global.conf . . . . . . . . . . . SSL conf that applies to default server _and all_ virtual hosts
# |
# |-- default-server.conf . . . . . . . . . set up the default server that replies to non-virtual-host requests
# | |--mod_userdir.conf . . . . . . . . enable UserDir (if mod_userdir is loaded)
# | `--conf.d/apache2-manual?conf . . . add the docs ('?' = if installed)
# |
# |-- sysconfig.d/include.conf . . . . . .[*] your include files
# | (for each file to be included here, put its name
# | into APACHE_INCLUDE_* in /etc/sysconfig/apache2)
# |
# `-- vhosts.d/ . . . . . . . . . . . . . . for each virtual host, place one file here
# `-- *.conf . . . . . . . . . . . . . (*.conf is automatically included)
#
#
# Files marked[*] are created from sysconfig upon server restart: instead of
# these files, you edit /etc/sysconfig/apache2



# Filesystem layout:
#
# /etc/apache2/
# |-- conf.d/
# | |-- apache2-manual.conf . . . . . . . conf that comes with apache2-doc
# | |-- mod_php4.conf . . . . . . . . . . (example) conf that comes with apache2-mod_php4
# | `-- ... . . . . . . . . . . . . . . . other configuration added by packages
# |-- default-server.conf
# |-- errors.conf
"httpd.conf" 208L, 8189C
__________________
MFG Schifti
auch ein Forum (PHP)
schifti ist offline   Mit Zitat antworten
Alt 22.11.2004, 11:16  
Gast
 
Beiträge: n/a
Standard

Hey

Das muss in der httpd.conf drinstehen. Oder in einer includeten.

AllowOverride AuthConfig

AccessFileName .htacces

<Files ~ "^\.ht*">
Order allow, deny
Deny from all
</Files>

Das steht aber alles normalerweise schon in der httpd.conf


By Huflatisch
  Mit Zitat antworten
Alt 25.11.2004, 07:27  
Erfahrener Benutzer
 
Registriert seit: 01.09.2004
Beiträge: 532
PHP-Kenntnisse:
Fortgeschritten
schifti
Standard

Folgendes steht bei mir drinn:

# forbid access to the entire filesystem by default
<Directory />
Options None
AllowOverride None
Order deny,allow
Deny from all
</Directory>

# use .htaccess files for overriding,
AccessFileName .htaccess
# and never show them
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>


Aber trotzdem erkennt er keine .htaccess Datei.
__________________
MFG Schifti
auch ein Forum (PHP)
schifti ist offline   Mit Zitat antworten
Alt 25.11.2004, 07:40  
Gast
 
Beiträge: n/a
Standard

Zitat:
Zitat von schifti
Aber trotzdem erkennt er keine .htaccess Datei.
Nicht trotzdem sondern genau deshalb.

Wenn Du .htaccess beachtet wissen willst, mußt Du entweder für das Verzeichnis oder mindestens für das Documentroot das AllowOverride erlauben.
Code:
# zB. im Virtualhost
<directory "/pfad/zum/documentroot">
  AllowOverride all
# und was Du sonst noch willst...
</directory>
  Mit Zitat antworten
Alt 25.11.2004, 07:58  
Erfahrener Benutzer
 
Registriert seit: 01.09.2004
Beiträge: 532
PHP-Kenntnisse:
Fortgeschritten
schifti
Standard

Also so?

# forbid access to the entire filesystem by default
<Directory /srv/www/htdocs>
Options None
AllowOverride All
Order deny,allow
Deny from all
</Directory>

# use .htaccess files for overriding,
AccessFileName .htaccess
# and never show them
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
__________________
MFG Schifti
auch ein Forum (PHP)
schifti ist offline   Mit Zitat antworten
Alt 25.11.2004, 08:15  
Gast
 
Beiträge: n/a
Standard

Zitat:
Zitat von schifti
Also so?
Nein.

Das sollte bleiben:
Code:
# forbid access to the entire filesystem by default 
<Directory /> 
 Options None 
 AllowOverride None 
 Order deny,allow 
 Deny from all 
</Directory> 

# use .htaccess files for overriding, AccessFileName .htaccess
# and never show them
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>
Die Veränderungen gehören in den Virtualhost:
Code:
<Directory "/srv/www/htdocs">

  AllowOverride all

  <IfModule mod_access.c>
    Allow from all
  </IfModule>
</directory>

NameVirtualHost 1.2.3.4:80 # Deine IP

<VirtualHost 1.2.3.4:80> # Deine IP
  ServerName example.com
  ServerAlias www.example.com

  DocumentRoot /srv/www/htdocs
  Options FollowSymLinks

  php_admin_flag safe_mode Off
  php_admin_flag file_uploads On
  php_admin_flag track_vars On
  php_admin_flag magic_quotes_runtime Off
  php_admin_flag magic_quotes_gpc Off
  php_admin_value upload_tmp_dir /tmp
  php_admin_value include_path "."
  php_admin_value default_charset none
  php_admin_value open_basedir /srv/www/htdocs:/tmp

  php_admin_value session.cookie_path /
  php_admin_value session.auto_start 0
  php_admin_value session.gc_maxlifetime 1800
  php_admin_value session.use_cookies 1
  php_admin_value session.cookie_lifetime 0
  php_admin_value session.cookie_secure Off
  php_admin_value session.use_trans_sid 0

  DirectoryIndex index.html index.htm index.php
</virtualhost>
  Mit Zitat antworten
Alt 25.11.2004, 08:45  
Erfahrener Benutzer
 
Registriert seit: 01.09.2004
Beiträge: 532
PHP-Kenntnisse:
Fortgeschritten
schifti
Standard

Zitat:
Zitat von meikel

Nein.

Die Veränderungen gehören in den Virtualhost:
Code:
<Directory "/srv/www/htdocs">

  AllowOverride all

  <IfModule mod_access.c>
    Allow from all
  </IfModule>
</directory>

NameVirtualHost 1.2.3.4:80 # Deine IP

<VirtualHost 1.2.3.4:80> # Deine IP
  ServerName example.com
  ServerAlias www.example.com

  DocumentRoot /srv/www/htdocs
  Options FollowSymLinks
..............
...
..............
</virtualhost>
Das kommt doch in die listen.conf oder?

Dann gibt er mir beim Starten folgenden Fehler:
Code:
Starting httpd2 (prefork) Syntax error on line 56 of /etc/apache2/listen.conf:
</directory> without matching <directory> section

The command line was:
/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
Und da steht "ServerAlias data". Oder muss es eine richtige Domain sein?
Weil das ist nur fürs Intranet gedacht.
__________________
MFG Schifti
auch ein Forum (PHP)
schifti ist offline   Mit Zitat antworten
Alt 25.11.2004, 09:56  
Gast
 
Beiträge: n/a
Standard

Zitat:
Zitat von schifti
Das kommt doch in die listen.conf oder?
Nein, janz unten in die httpd.conf.

Erst der default Server, dann die Virtualhosts.

Das ist das Prinzip, wie man mehrere Domains auf einem Server verwalteten kann. Der erste Virtualhost fungiert dann als default Eintrag.

Natürlich mußt Du '1.2.3.4' und 'example.com' anpassen.

Zitat:
Und da steht "ServerAlias data". Oder muss es eine richtige Domain sein?
Handbuch lesen!

Code:
ServerName example.com
ServerAlias www.example.com subdomain47.example.com www.subdomain47.example.com 
  Mit Zitat antworten
Antwort


Themen-Optionen
Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an
Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
.htaccess LA-Finest HTML, Usability und Barrierefreiheit 4 28.02.2007 22:39
linux 9.3 startmenü chiliGREEN Server, Hosting und Workstations 9 30.07.2006 23:17
Webseiten werden bei Linux nicht richtig angezeigt Server, Hosting und Workstations 13 16.10.2005 13:39
kostenlose und vollständige PHP-IDE für linux? PHP Tipps 2005-2 3 12.10.2005 17:58
Datenbank in Windows und Linux benützen karl Datenbanken 4 12.10.2005 14:37
Datenbank in Windows und Linux benützen karl PHP Tipps 2005-2 1 12.10.2005 12:06
AOL bei Linux ClaBo3 Server, Hosting und Workstations 7 18.05.2005 13:24
[Erledigt] TTF-Fonts unter Linux anders als unter Win (GD2) Server, Hosting und Workstations 2 15.03.2005 11:25
PHP einrichten unter Linux Server, Hosting und Workstations 3 04.03.2005 20:53
[Erledigt] Linux Server, Hosting und Workstations 14 25.11.2004 17:04
webserver mit linux flyingeagle Server, Hosting und Workstations 10 02.11.2004 19:14
Umstieg auf Linux Quadaptor Server, Hosting und Workstations 17 05.10.2004 11:55
Apache2 unter Linux und Siemens Gigaset SE505 funzt nicht Server, Hosting und Workstations 5 21.07.2004 08:43
Problem mit .htaccess und php PHP Tipps 2004 2 05.07.2004 14:06
[Erledigt] PHP Script von Windows auf Linux PHP-Fortgeschrittene 7 15.06.2004 13:23

Besucher kamen über folgende Suchanfragen bei Google auf diese Seite
apache2.conf htaccess, htaccess wird nicht beachtet, htaccess apache2.conf, htaccess linux, .htaccess wird nicht beachtet, apache2.conf .htaccess, htaccess apache config, apache config htaccess, linux htaccess, apache beachtet htaccess nicht, .htaccess linux, htaccess apache2 linux, .htaccess apache2.conf, htaccess apache2, apache2.config htaccess, apache erkennt htaccess nicht, .htaccess apache2 mime virtual host, apache conf htaccess, apache2 linux htaccess, linux apache htaccess

Alle Zeitangaben in WEZ +2. Es ist jetzt 00:16 Uhr.




Powered by vBulletin® Version 3.7.2 (Deutsch)
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Aprilia-Forum, Aquaristik-Forum, Liebeskummer-Forum, Zierfisch-Forum, Geizkragen-Forum

Creative Commons License
Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.