Reputation: 83
I have a ci3 and react js project, my app is in var/www/html/reactframework directory and i have configured my virtual host and .htaccess like this
> <VirtualHost *:8081>
> ServerAdmin webmaster@localhost
> ServerName local.reactframework.com
> DocumentRoot /var/www/html/reactframework
> ErrorLog ${APACHE_LOG_DIR}/error.reactframework.log
> CustomLog ${APACHE_LOG_DIR}/access.reactframework.log combined </VirtualHost>
.htaccess in root
RewriteEngine On
Options -Indexes
Header always edit Set-Cookie (.*) "$1; HTTPOnly"
Header set X-XSS-Protection "1; mode=block"
<IfModule mod_rewrite.c>
RewriteRule (.*) http://www.example.com/$1?vardump&thex=%{REQUEST_FILENAME} [R=301,L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.html [NC,L]
</IfModule>
.htaccess in user app
RewriteEngine On
Options -Indexes
Header always edit Set-Cookie (.*) "$1; HTTPOnly"
Header set X-XSS-Protection "1; mode=block"
#php_value session.cookie_httponly 1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
I have been trying make it work for a while now but i'm not able to access my apis. my project structure is something like this
reactframework
...user
....application
......modules
.......auth
.........controllers
...........Auth.js
....htacces
This same project is live and is working properly on aws , i'm new and have been trying to configure it for my system. I'm sure it's something very small that i'm not able to find. Please Help !!!
Upvotes: 0
Views: 18