NetVision-Technik

NetVision-Technik (http://www.netvision-technik.de/forum/index.php)
-   Webserver (http://www.netvision-technik.de/forum/forumdisplay.php?f=9)
-   -   Source im Unterordner (http://www.netvision-technik.de/forum/showthread.php?t=5318)

wasnun 20.05.2010 17:42

Source im Unterordner
 
hallo alle.

Undzwar möchte ich den tracker in nen unterordner machen. bsp.

var/www/xyz/
(normal ist ja : var/www )

in config.php und so hab ich halt nameurl.endung/xyz

soweit funzt das auch. aber er hatt halt meistens header fehler oder so als würd er die phps nicht finden.

Hatt es beim includen so probiert.

PHP-Code:

require "include/xyphpz.php";
require 
"xyz/include/xyphpz.php";
 
require_once(
$_SERVER["DOCUMENT_ROOT"] . "/include/xyphpz.php");
require_once(
$_SERVER["DOCUMENT_ROOT"] . "/xyz/include/xyphpz.php");
 
oder umgekert halt 

Hab aber mal gelesen das mann das auch im apache oder so ändern muss ?

was genau muss ich noch alles ändern das es funzt ?

THX schon mal

D@rk-€vil™ 20.05.2010 17:45

Zitat:

(normal ist ja : var/www )
wo lebst du?

hintern Mond?

Sorry aber das solltest du normal schon wissen wohin es richtig hin gehört!

Und benutz ma die SUFU !!!!!!!!!!!!!

wasnun 20.05.2010 17:51

hmm normal hatte ich die source : ..var/www/die source

und haben möcht ich es .. var/www/xyz/die source

(sorry dacht var/www ist normal )

und hab sufu benutzt aber nicht wirklich was gefunden.

xatnyS 20.05.2010 18:12

rofl na dann einfach im apache weiter verlinken auf var/www/xyz/diesource

dann siehste doch was passiert probieren geht über studieren ^^

wasnun 20.05.2010 18:14

ja aber wo genau ? hab bestim 13 apache ordner aufm server (jeweils in anderen ordnerm vom root)

muss das ja glaube in

sites-enabled

und

sites-available

nur vo find ich die die ich bearbeiten muss ?

DirtyPlaya 20.05.2010 18:17

/etc/apache2/site-available

dort den vhost umstellen bzw einen neuen vhost anlegen fertig

wasnun 20.05.2010 18:23

doch im etc ordner. danke werds mal prob.

xatnyS 20.05.2010 18:24

:laugh: genau Dirty is mir zuvor gekommen^^

wasnun 20.05.2010 18:29

dann zeigt er mir an wenn ich die index.php akt.
Code:

Warning: Cannot modify header information - headers already sent by (output started at /var/www/xyz/index.php:1) in /var/www/xyz/index.php on line 9
Und dort steht :
PHP-Code:

header("location: login.php"); 


D@rk-€vil™ 20.05.2010 18:33

NetVision-Technik

da und wen du des dann immer noch nicht hinbekommst......dann kündige dein server und such dir nen neues hobby ^^

xatnyS 20.05.2010 18:40

:laugh::laugh:

wasnun 20.05.2010 18:46

naja hab das so :
sites-available
Code:


ServerAdmin webmaster@localhost
 
DocumentRoot /var/www/xyz/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/xyz/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /dev/null
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /dev/null combine
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>

und sites-enabled

Code:

ServerAdmin webmaster@localhost
 
DocumentRoot /var/www/xyz/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/xyz/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /dev/null
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /dev/null combine
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>

und wenn ich apache reestarten möchte zeigt er mir an :
Code:

.........:~# /etc/init.d/apache2 restart
Restarting web server: apache2We failed to correctly shutdown apache, so we're n    ow killing all running apache processes. This is almost certainly suboptimal, so      please make sure your system is working as you'd expect now! (warning).
 ... waiting apache2: Syntax error on line 281 of /etc/apache2/apache2.conf: Syn    tax error on line 40 of /etc/apache2/sites-enabled/000-default: </VirtualHost> w    ithout matching <VirtualHost> section
 failed!


und bei logintracker dann :

PHP-Code:

Warning: require_once(/var/www//include/bittorrent.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/xyz/logintracker.php on line 2
 
Fatal error: require_once() [function.require]: Failed opening required '/var/www//include/bittorrent.php' (include_path='.:/usr/share/php:/usr/share/pear'in /var/www/xyz/logintracker.php on line 2 


D@rk-€vil™ 20.05.2010 18:51

no comment.........das is komplet fürn hintern da.....lies den thread bei den link und fertig..........


ansonnsten SERVER KÜNDIGEN ^^

Sniperdeutsch 20.05.2010 19:11

mutige Aktion
Options Indexes FollowSymLinks MultiViews

ohne Option -Indexes

und scheisse aufgebaut ist es auch noch aber dafür gibt ja google :D

wasnun 20.05.2010 19:35

Also habs jetzt so :

sites-enabled
Code:

NameVirtualHost *


<
Directory
/>
Options FollowSymLinks
AllowOverride none
</Directory
>
   
ServerTokens Prod
    ServerSignature Off
    ErrorLog
/var/log/apache2/error.
log
    CustomLog
/var/log/apache2/access.
log combined
    LogLevel warn

<VirtualHost
*>
   
ServerName http:
//domain
   
ServerAlias domain
    DocumentRoot
/var/www/xyz

   
<Directory /var/www/xyz
/>
   
AllowOverride all
   
</Directory
>
</
VirtualHost
>



und

sites-available

Code:

<VirtualHost *:80>
   
ServerAdmin webmaster@
localhost
   
    DocumentRoot
/var/www
/xyz/
    <
Directory
/>
       
Options FollowSymLinks
        AllowOverride None
   
</Directory
>
    <
Directory /var/www
/xyz/>
       
Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow
,
deny
        allow from all
   
</Directory
>

   
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin
/
    <
Directory "/usr/lib/cgi-bin"
>
       
AllowOverride None
        Options
+ExecCGI -MultiViews +
SymLinksIfOwnerMatch
        Order allow
,
deny
        Allow from all
   
</Directory
>

   
ErrorLog /var/log/apache2/error.
log

   
# Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
   
LogLevel warn

    CustomLog
/var/log/apache2/access.
log combined

    Alias
/doc/
"/usr/share/doc/"
   
<Directory "/usr/share/doc/"
>
       
Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny
,
allow
        Deny from all
        Allow from 127.0.0.0
/255.0.0.0 ::1/
128
   
</Directory
>

</
VirtualHost





restarten des apache funzt auch.

doch wenn ich dan . dieurl.endung
eingebe zeigt er mir die index an (aber nur das logo und drunter info. das navi links und den rest zeigt er nicht an)

und wenn ich : dieurl.endung/xyz eingebe zeigt er mit an :

Code:

Not Found

The requested URL /xyz/ was not found on this server.



und wenn ich dieurl.endung/xyz/index.php eingebe zeigt er mir an :
Code:

Not Found

The requested URL /xyz/index.php was not found on this server.



und das bei jeder seite.


(viel. bin ich grad echt zu blöd dafür)(wenn ja bitte Entschuldige)

Lex 20.05.2010 20:58

Was hat das mit Programmierung zu tun?

/moved

Lg Lex

Feudas 21.05.2010 03:00

Zitat:

Zitat von wasnun (Beitrag 56754)
(viel. bin ich grad echt zu blöd dafür)(wenn ja bitte Entschuldige)

Öhm ja erlich gesagt hast du recht.
wenn du dem apache sagst das sein unterstes verzeichniss also das / in www/xyz/ liegt
das kann er nicht weiter runter als im ordner xyz, das heist wenn du eine datei aufrufst findet er si enicht wenn der pfad www/inde.php wäre weil er selbst ja schon in www/xyz/ drin ist.
wenn du da drin dann index.php aufrufst geht das einwandfrei.
das heist ind er konfig des trackers musst du dann auch dennormalen pfad ohne das xyz angeben weil da ist er schon drin.

Also beispiel du hast die domain testertest.de, wenn man die aufruft wird die datei /var/www/index.php geladen.
wenn du in der apache konfig aber sagst sein root ist /var/www/xyz dann wird bei aufruf der testertest.de
die datei /var/www/xyz/index.php aufgerufen :D

Wenn du das nun auch nicht verstehst muss ich dem vorschlag beistimmen das du es aufgeben solltest.:D

wasnun 21.05.2010 10:39

boing ist ja logisch muss das in der config wieder weg machen
Ups


Soweit funzt das jetzt.

THX an alle und danke für die Geduld ; )


Alle Zeitangaben in WEZ +1. Es ist jetzt 02:07 Uhr.

Powered by vBulletin® Version 3.8.9 (Deutsch)
Copyright ©2000 - 2025, vBulletin Solutions, Inc.