شاطی رودخانه ای به سوی دنیای متن باز

پروژه ها و برنامه ها و سمینار های اینجانب به صورت آزاد در این سایت قرار می گیرد

شاطی رودخانه ای به سوی دنیای متن باز

پروژه ها و برنامه ها و سمینار های اینجانب به صورت آزاد در این سایت قرار می گیرد

پروژه ها و برنامه ها و سمینار های اینجانب به صورت آزاد در این سایت قرار می گیرد. امیدوارم با این کار سرآغازی برای آزادی در مرز های دانش باشم .

طبقه بندی موضوعی
کلمات کلیدی
آخرین مطالب
۲۳
اسفند ۹۳

http://www.jamesfairhurst.co.uk/posts/view/installing_cakephp

 

 

 

/etc/apache2/sites-available

sudo gedit 000-default.conf

 

sudo service apache2 restart

 

 

 

Adding a CakePHP based virtual host in Apache 2.2

 

It's very simple to set up a name based virtual host in Apache 2.2 using the default Ubuntu package.

I'm assuming that you have installed Apache already and that you have edited /etc/apache2/sites-enabled/000-default to change the AllowOverride None to something like this:
 

<Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>


If you have not already used this command
 

sudo a2enmod rewrite


then do so in order to enable mod_rewrite.

Now edit your /etc/hosts file and add an entry that points to the server where you are setting up the virtual host.

The line should look something like this:
 

192.168.0.100  mysite.local


Where the IP address points to the server where you are setting up the host and mysite.local is a nickname for the site. Remember to add the .local :)

Now create a file in /etc/apache2/sites-available and name it something that relates to the sitename (for future maintainability). I would suggest naming it the same as the sitename. Edit it and copy this basic skeleton structure into it:
 

<VirtualHost *:80>
        ServerAdmin webmaster@example.com
        ServerName  mysite.local
        ServerAlias mysite

        # Indexes + Directory Root.
        DirectoryIndex index.php
        DocumentRoot /var/www/mysite/
</VirtualHost>


It is important that the ServerName matches the entry you made in your /etc/hosts file.

Now run the command a2ensite mysite.local which is a Debian convenience command which creates the symbolic link from the file you created to the /etc/apache2/sites-enabled/ directory.

You will need to restart Apache (service apache2 restart). If all is well you will be able to navigate to http://mysite.local on your local machine and view the site present on the server at /var/www/mysite

 

 

 

 

در فایل کیک فایل .htaccess  ایجاد شود

<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteRule    ^$ app/webroot/    [L]
   RewriteRule    (.*) app/webroot/$1 [L]
   </IfModule>

 

 

 

موافقین ۰ مخالفین ۰ ۹۳/۱۲/۲۳
مبین

نظرات  (۰)

هیچ نظری هنوز ثبت نشده است

ارسال نظر

ارسال نظر آزاد است، اما اگر قبلا در بیان ثبت نام کرده اید می توانید ابتدا وارد شوید.
شما میتوانید از این تگهای html استفاده کنید:
<b> یا <strong>، <em> یا <i>، <u>، <strike> یا <s>، <sup>، <sub>، <blockquote>، <code>، <pre>، <hr>، <br>، <p>، <a href="" title="">، <span style="">، <div align="">
تجدید کد امنیتی