PHP related paths in Ubuntu environment
How to change the development directory path of PHP in Apache2 in Ubuntu After installing PHP and Apache, The default development directory address: /var/www Change: Change the two /var/www in it to the directory you want, mine is /home/dev/www Or create a symbolic link under /home/dev:
Then change the permissions: sudo chmod 777 /var/www Start apache2
OK! Modify the default root directory of the website under Ubuntu10 Apache2 php5 Modify the default document directory of apache2 in ubuntu10.10. The default directory is in /var/www as follows: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> 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 ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/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> <VirtualHost *:8080> DocumentRoot /var/www/ </VirtualHost> The last step is to restart apache
Ubuntu modifies the web root directory Change the default document root directory Ubuntu permission settingsHow to use chmod in Ubuntu (using numbers to assign permissions) Essential Ubuntu file permissions are divided into read, write, and execute according to the number. According to the binary assignment, the number 4 represents the read permission-------'r' File permissions are divided into user, group user, and other '123' '1' represents the user, '2' represents the group user, and '3' represents other basic commands to learn and view file permissions Ubuntu Modify Apache2 website root directory and default web page
<IfModule mod_dir.c> DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm </IfModule> Add the desired files or paths, the priority is to read from the beginning to the end (if there is no file, read the next one), such as adding index.php, dokuwiki <IfModule mod_dir.c> DirectoryIndex dokuwiki index.php index.html index.cgi index.pl index.php index.xhtml index.htm </IfModule> This is the end of this article about PHP-related paths in Ubuntu environment. For more relevant Ubuntu PHP path content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! |
<<: Vue implements multi-grid input box on mobile terminal
>>: MySQL 8.0.23 installation super detailed tutorial
Mainly discuss its structure and some important pr...
Let's take a look at the detailed method of b...
text 1) Download the Ubuntu image docker pull ubu...
When using HTML tables, we sometimes need to chan...
When vue2 converts timestamps, it generally uses ...
What is HTTP Compression Sometimes, relatively la...
The GtkTreeView component is an advanced componen...
Table of contents Overview CommonJS Specification...
This article example shares the specific code of ...
An image link <img src="" /> I wa...
Table of contents 1. MySQL Architecture 2. Networ...
This article uses examples to explain the concept...
Linux server hosts file configuration The hosts f...
Recently, when I was working on my "Football...
Data URI Data URI is a scheme defined by RFC 2397...