(a) Simple Apache server Build!
For file de upload, download, modify, delete!
----------
-Apache
1. Use the widest Web Server, support the execution of various scripts (PHP)
2. Mac comes with, only need to modify a few configuration can, simple, fast
3. Some special server functions,Apache can be very good support
For example:HTTP put/delete operation, knowledge supplement involves the HTTPS service
-WebDav
HTTP protocol-based "file" server
Implement file upload/download/modify/delete
-FTP
File Transfer Protocol, FTP-based file Management Server
Can do file upload/download/modify/delete
----------
The above three kinds of servers, as long as the IP address can access, no matter in any location, can use!
* About permissions issues with WebDav
Format of the authorization information BASIC (user name: password) base64
Security is not high, passwords are easily intercepted and cracked!
Application scenario: The development of enterprise-level management system, you can use WEBDAV to build an internal file Management Server, only in the company intranet use!
----------------
Apache configuration:
1, the Finder, under the current user (/users/xxx (user name)/sites), create a "Sites" folder;
$ mkdir/users/xxxx/sites
2, Modify the configuration file of the two "path";
# switch Directories
$ cd/etc/apache2
# Backup
$ sudo cp httpd.conf Httpd.conf.bak
# Edit
$ sudo vi httpd.conf
# Find documentroot
*: Modify path to just new folder path (/users/xxx (username)/sites)
# find "Options followsymlinks multiviews", add a word "Indexes"
*: "Options Indexes followsymlinks multiviews"
# find PHP [view mode, search by "/php". ]
*: Delete the beginning of the comment "#"
# Save and exit
*: X
3. Switch directories, copy php.ini files
$ cd/etc
$ sudo cp php.ini.default php.ini
4. Restart Apache Server
$ sudo apachectl-k restart
----------------
Attention?:
Manually restarting the Apache server each time
$ sudo apachectl-k start
Execute script, show access denied (format NTFS, modify permissions)
$ chmod 644 info.php "(file name with no permissions)
$ chmod 644 * *
================
Ps:
[ one sentence per day ]
"When in doubt, use brute force."--Ken Thompson
[ an English song every day ]
"Summertrain"--Greyson Chance
================
|--> Copyright (c) Bing Ma.
|--> GitHub RUL: https://github.com/SpongeBob-GitHub
Apache & WebDav configuration (i)