Jump to content

Search the Community

Showing results for tags 'document root'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 2 results

  1. Hi all !! I have finally setup my ubuntu linux VM on Virtual box for web development. My document root is /vagrant/myproject.com/public. which is the same as /var/www/myproject.com/public. This is the directory structure by default if i understand correct. My project folder which contains the index.php and all other files and folders is in say a folder called Magical. Now I am supposed to place my project folder at this location: /vagrant/myproject.com/public/Magical. If I now type, http://myproject/magical in the URL, the index.php inside Magical is invoked correcty and displays the webpage. However this is rather odd and not in accordance with the manner websites are normally invoked. I would like to type, just like everyone else, http://Magical.com to invoke the index.php. That would be like placing Magical in place of myproject in the folder hierarchy so that the document root is /vagrant/Magical.com/public. That seems to go against the convention and the tutorial followed. The root folder should be below the public folder. So what should I do to rectifyy this ? Do I need to change some settings in the conf files or in the placement of my folder so that I just type http://Macical.com to invoke the index.php ? Please help clarify. Thanks all !
  2. Hello everyone, I'm making some improvements to site I haven't created so please tell me how it exactly works as I have problems to configure it properly. I've downloaded all files and run localhost using XAMPP. Site should run when accessing /home/some_domain/public_html/index.php so I've created : <VirtualHost *:80> DocumentRoot "C:/xampp/htdocs/SomeProject/home/some_domain/public_html" ServerName some_project <Directory "C:/xampp/htdocs/SomeProject/home/some_domain/public_html"> AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> That means, when I'm accessing http://some_project it runs index.php And that's ok. In index.php there's some include: include_once("includes/startup.php"); So it includes relatively there: /home/some_domain/public_html/includes/startup.php And that's fine. However... In startup.php there's something like this: define("_ROOTPATH_","/home/some_domain/public_html/"); and next line: include_once(_ROOTPATH_ ."includes/config.php"); And that's my problem as index.php was executed from C:/xampp/htdocs/SomeProject/home/some_domain/public_html/ so that include_once will behave this way: C:/xampp/htdocs/SomeProject/home/some_domain/public_html/home/some_domain/public_html/includes/config.php Of course such file is not available as it should direct to: C:/xampp/htdocs/SomeProject/home/some_domain/public_html/includes/config.php I'm not sure how it works on server and what I should do with my localhost to achieve that same environment. $_SERVER['DOCUMENT_ROOT'] for real site is: /home/some_domain/public_html Please help me to understand what I'm doing wrong.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.