שרת APACHE...

liran lev

New member
שרת APACHE...

שלום לכולם, התקנתי היום שרת apache על windows xp pro. כשאני נכנס לספרית ה-root דרך הדפדפן, אני רואה את רשימת הקבצים ששמתי שם, איך אני מגדיר לשרת שלא יעשה list directory בצורה כזו אלא יפתח את קובץ ה- default במקום. כשאני לוחץ על index.php שנמצא למשל בספריה הוא שואל אם לשמור את הקובץ. איך מתגברים על הבעיה, מה צריך בדיוק לשנות?! תודה רבה, לירן
 

אמיר ט

New member
2 דברים

תכנס לקובץ httpd.conf ובו תגדיר את 2 הדברים הבאים DirectoryIndex default.html index.html index.php..... ובנוסף AddType application/x-httpd-php .php .php3 .php4 בנוסף מומלץ שיהיה מותקן לך PHP על המחשב, זה יכול להיות נחמד
 

liran lev

New member
ניסיתי, לא עזר...

קודם כל, הרבה תודה על התשובה המהירה... ערכתי את השינויים הנ"ל אך לא עושה רושם שזה הזיז לו .... הוא לא מופנה לקובץ index.php אגב, התקנתי php כבר ...
 

אמיר ט

New member
זה לפי סדר עדיפויות

קודם הוא ינסה את דיפולט אח"כ את index.html וכך הלאה... תחפש את ה <Directory> של ה ROOT שלך ודחוף את זה שם. בקשר ל PHP, יש בקובץ INSTALL הסברים איך להתקין...
 

liran lev

New member
זה בדיוק מה שעשיתי...

אני יודע שהוא הולך לפי סדר עדיפויות, אבל הוא עדיין פותח לי את ה- list של ה- directory של ה- root ... את ה- php התקנתי בלי שום בעיה....
 

אמיר ט

New member
היצרן מסביר הכי טוב ../images/Emo13.gif :

Options directive Syntax: Options [+|-]option [[+|-]option] ... Context: server config, virtual host, directory, .htaccess Override: Options Status: core The Options directive controls which server features are available in a particular directory. option can be set to None, in which case none of the extra features are enabled, or one or more of the following: All All options except for MultiViews. This is the default setting. ExecCGI Execution of CGI scripts is permitted. FollowSymLinks The server will follow symbolic links in this directory. Note: even though the server follows the symlink it does not change the pathname used to match against <Directory> sections. Note: this option gets ignored if set inside a <Location> section. Includes Server-side includes are permitted. IncludesNOEXEC Server-side includes are permitted, but the #exec command and #exec CGI are disabled. It is still possible to #include virtual CGI scripts from ScriptAliase´d directories. Indexes If a URL which maps to a directory is requested, and the there is no DirectoryIndex (e.g., index.html) in that directory, then the server will return a formatted listing of the directory. MultiViews Content negotiated MultiViews are allowed. SymLinksIfOwnerMatch The server will only follow symbolic links for which the target file or directory is owned by the same user id as the link. Note: this option gets ignored if set inside a <Location> section. Normally, if multiple Options could apply to a directory, then the most specific one is taken complete; the options are not merged. However if all the options on the Options directive are preceded by a + or - symbol, the options are merged. Any options preceded by a + are added to the options currently in force, and any options preceded by a - are removed from the options currently in force. For example, without any + and - symbols: <Directory /web/docs> Options Indexes FollowSymLinks </Directory> <Directory /web/docs/spec> Options Includes </Directory> then only Includes will be set for the /web/docs/spec directory. However if the second Options directive uses the + and - symbols: <Directory /web/docs> Options Indexes FollowSymLinks </Directory> <Directory /web/docs/spec> Options +Includes -Indexes </Directory> then the options FollowSymLinks and Includes are set for the /web/docs/spec directory. Note: Using -IncludesNOEXEC or -Includes disables server-side includes completely regardless of the previous setting. The default in the absence of any other settings is All.​
 

liran lev

New member
תודה רבה לך, אמיר....

קטע המקור הזה, הוא בדיוק מה שחיפשתי?! אולי העצלות שלי לא הובילה אותי לקובץ הזה שהיה כבר ברשותי?! בכל אופן, אני חושב שמצאתי א הבעיה (והמסמך הנ"ל מחזק אותי)... את ה- php לא התקנתי כראוי... כשאני מפנה אותו לקובץ מסוג זה, הוא באופן טבעי לא מוצא אותו ומציג לי רשימה של התיקיה. תגיד זו לא בעיה חמורה באבטחה להציג כך רשימת תיקיה היכולה לציין למשתמש את הנתיב המלא לדטהבייס?! תודה שוב!!! לירן
 

Raful

New member
דפדוף בספרייה זו לא בעיית אבטחה

לפעמים זה אפילו יותר נוח (כשאין לך כוח לכתוב יישום של גלריית תמונות לחופשה האחרונה שלך באנגליה
). בסיס הנתונים - אם מדובר על בסיס נתונים מסוג MySQL - אפשר להתקין אותו במקומות אחרים, לאו דווקא בספרייה של ה-root. גם בסיס נתונים של ODBC אפשר לשים בספרייה מתחת לספריית ה-root, או בספרייה שבכלל לא קשורה ל-root בשום צורה.
 

liran lev

New member
חבר´ה אני לא מצליח להגדיר php ...

על השרת apache , בסוף ההתקנה הוא אומר שאני צריך לשנות את הקובץ httpd.conf ידנית, האם הכוונה היא להוסיף בשורה AddType application את השורה x-httpd-php .php .php3 .php4/ ?! כי עשיתי את זה והוא עדיין לא מציג לי קבצי php ...
 

Raful

New member
זה ישמע מטורף...

יכול להיות שאתה שם קבצים בתיקייה של IIS? יש לך XP PRO, שעליו אפשר להתקין IIS... אם עבדת לפי ההוראות (יש מדריך בגיידס), וכתבת הכל נכון, אז אין לי מושג מה יכולה הבעיה.
 

liran lev

New member
אחי זה באמת נשמע מטורף :)

אני אמנם newbie בהתקנת apache אבל עדיין עברתי כברת דרך בתקופה האחרונה, אני יודע לעשות את ההבדלה בין ה- inetpub לבין הספריה הציבורית של האפצ´י... תודה רבה על הקישור, אני מקווה שהוא יבהיר לי את הנקודה!!!
 
למעלה