I have Filemaker server 19 running on ubuntu 18.04,it allow me to host a web page, because it include apache inside, is there any way to load a laravel project on it?
Which file start a laravel project to call it on apache start?
Here is part of httpd.conf code file
<Directory />
AllowOverride none
Options +SymLinksIfOwnerMatch
Require all granted
</Directory>
DocumentRoot "/opt/FileMaker/FileMaker Server/HTTPServer/htdocs"
<Directory "/opt/FileMaker/FileMaker Server/HTTPServer/htdocs">
AllowOverride All
Allow from all
Options +SymLinksIfOwnerMatch
Require all granted
</Directory>
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
Make some changes to your laravel project
On your project root "server.php" rename to "index.php".
Copy ".htaccess" from public to root directory.
Now project will run without the 'PHP artisan serve' command.
Related
I just have installed via homebrow apache, php, and Mysql on my mac, everything works fine.
But i tried to install phpMyAdmin, still from homebrew, i have edited my httpd.conf as mentionned.
Alias /phpmyadmin /usr/local/share/phpmyadmin
<Directory /usr/local/share/phpmyadmin/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>
but when i reach http://localhost/phpmyadmin it shows the code of index.php, which tells me that the alias is OK.
http://localhost/ with a phpinfo works fine. But the folder is in /Users/my-username/Sites/
I tried to put phpmyadmin in this folder but it launch a 404.
How to force a folder to process php with apache ?
I want apache2 to host home.php or whatever I choose as the start page instead of index.html. Everything I have read says to edit the DirectoryIndex parameter of the httpd.conf file. I do not have that file anywhere. (I searched.)
I also did not have an .htaccess file by default. I created one and put the line DirectoryIndex home.php in it; I then restarted apache. Nothing chaged.
This is in my apache2.conf file.
<Directory /var/www/html>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
I am not sure what Options Indexes FollowSymLinks does.
These are the file contents of my /var/www/html/.htaccess.
<Directory /var/www/html>
DirectoryIndex home.php
</Directory>
When I change AllowOverride to All I receive a server error.
Thanks.
The best way is to add DirectoryIndex to your vhost configuration.
<Directory /foo>
DirectoryIndex home.php
Allow Override All
</Directory>
When you want to use that option ins your .htaccess file you have to set AllowOverride All in your vhost configuration. Otherwise you should get an error in your log DirectoryIndex not allowed here.
I'm trying to create a RESTful API on a VirtualHost on my Apache 2.4 server (on Ubuntu). I have a php file named dbManager.php which I am using a RewriteRule to look like an api directory. It's working great except for PUT and DELETE commands, which are returning 403 errors. Here's a redacted version of my conf file:
<VirtualHost *>
ServerAdmin onigame#gmail.com
ServerName servername.com
ServerAlias *.servername.com
DirectoryIndex index.html index.php
DocumentRoot /path/to/local/dir/
<Directory />
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
<Limit PUT DELETE>
Require all granted
</Limit>
</Directory>
# RESTful services provided for the fake "api" directory
RewriteEngine on
RewriteRule ^/api/(.*)$ /dbManager.php/$1 [L]
ServerSignature On
AddDefaultCharset utf-8
</VirtualHost>
Well, the PUT and DELETE still aren't working and returning 403. I'm also worried that I don't really want to allow PUT and DELETE everywhere on the directory, but only through the dummy api directory. What's the right way to do this?
I have managed to solve my question, but I don't really understand why it works:
<VirtualHost *>
ServerAdmin onigame#gmail.com
ServerName servername.com
ServerAlias *.servername.com
DirectoryIndex index.html index.php
DocumentRoot /path/to/local/dir/
<Directory />
Options Indexes FollowSymLinks MultiViews
AllowOverride All
</Directory>
<Directory /path/to/local/dir/>
Require all granted
Satisfy All
</Directory>
# RESTful services provided for the fake "api" directory
RewriteEngine on
RewriteRule ^/api/(.*)$ /dbManager.php/$1 [L]
ServerSignature On
AddDefaultCharset utf-8
</VirtualHost>
Best I can figure out, getting a 403 means that it's access being blocked, and not the type of HTTP request (which would result in a 405, not a 403). And the access problem is on the local directory, so it needs a special section for it. But I really don't understand why the two lines I put there make things work. The Require directive, that sort of makes sense. But the Satisfy directive, from what I can tell from the documentation, should default to All.
And yet when I remove either line, it doesn't work.
I'm trying to rework a legacy site by converting .html to .php for ease of future configuration. To accomplish this I'm working within the Apache server on my Mac OS X 10.9 machine. I've written an users.conf file uses mod_rewrite to remap the file names ending in .html to run as .php.
It was working fine when I left work yesterday, but today I get a "You don't have permission to access" error on the front end and a "[error] [client ::1] client denied by server configuration:" on the back end when I try to access localhost/~user/somefile.html.php All of the file permissions are set correctly (644 or 755 as appropriate).
Seems to only happen with files named somefile.html.php. Files named .html load fine and files named .php load fine. Apache version is 2.2.24.
Here is user.conf:
<Directory "/Users/user/Sites/mySite">
Options Indexes MultiViews FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/Users/user/Sites/mySite">
RewriteEngine on
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*\.html) $1.php
</Directory>
And here is relevant part of httpd.conf:
DocumentRoot "/Users/user/Sites"
LoadModule php5_module libexec/apache2/libphp5.so
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "/Users/user/Sites">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Maybe I've mixed together too many tutorials?
The answer was that I also needed to configure a virutal host.
This particular guide gave me the final clue I needed.
as in the title, this problem still persist, i've configured a virtualHost in apache2(on Ubuntu 12.04 on OVH Dedicated server), i've put a simple index.php in the base directory of my VirtualHost that contains this simple code:
<?php
echo "Hello world! ";
?>
but when i update my file by adding or removing code, i chek it by accessing the url http://test.xxxxx.ma:8082, the update is not applied, i've cleared my browser cache, used a new browser, i've cheked if mod_cache is enabled but it's not and i'm sur i'm working on the right directory, the new version of the file index.php is only served after a restart of apache2, my VirtualHost configuration is as follow :
<VirtualHost *:8082>
DocumentRoot "/var/www/vhosts/xxxxx.ovh.net/test"
ServerName test.xxxxx.ma
<Directory "/var/www/vhosts/xxxxx.ovh.net/test">
<IfModule sapi_apache2.c>
php_admin_flag engine on
</IfModule>
<IfModule mod_php5.c>
php_admin_flag engine on
</IfModule>
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch +Indexes
allow from all
</Directory>
</VirtualHost>
try adding
# Disable Caching for Scripts and Other Dynamic Files
<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
Header unset Cache-Control
</FilesMatch>
in a .htaccess file