Rabu, 12 November 2014

How to make web server(apache24) and install wordpress in freebsd

Now, I want to tell you how to make web server with apache24(note difference version, difference configuration, so please visit official website).

first install apache24

#cd /usr/ports/www/apache24
#make install clean

install mysql56-server

#cd cd /usr/ports/databases/mysql56-server
#make install clean

install php55

#cd /usr/ports/lang/php55
#make install clean

install php55-extensions

# cd /usr/ports/lang/php55-extensions
#make install clean

install mod_php55
#cd /usr/ports/www/mod_php55
#make install clean

install wordpress
 # cd /usr/local/www/wordpress
# make install clean

edit rc.conf
#ee /etc/rc.conf
and add this configuration
apache24_enable="YES"
mysql_enable="YES"

edit httpd.conf
 ee /usr/local/etc/apache24/httpd.conf

add this

LoadModule php5_module        libexec/apache24/libphp5.so #add this when there is no this configuration

 <IfModule php5_module>
       DirectoryIndex index.php index.html
       AddType application/x-httpd-php .php
       AddType application/x-httpd-php-source .phps
   </IfModule>

edit this

ServerName yourwebsite.com:80

DocumentRoot "/usr/local/www/wordpress"
<Directory "/usr/local/www/wordpress">
Options Indexes FollowSymLinks
   DirectoryIndex index.php index.html
   AllowOverride None
   Require all granted
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiVie
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
#    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
#    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
#    Require all granted
</Directory>

<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>

start mysql
#service mysql-server start

set your mysql user root

#mysqladmin -u root password "password" 

repalce password with -p when you didn't want password for user root

strat apache24

#service apache24 start

and the last, open your browser and search http://youripaddress
make wordpress configuration like usually

Tidak ada komentar:

Posting Komentar